修改运行环境

This commit is contained in:
Wenjie Zhang 2025-02-25 14:45:28 +08:00
parent 8f700b8308
commit 0a4aaab824
3 changed files with 5 additions and 5 deletions

View File

@ -11,8 +11,6 @@ COPY ../requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install -U gunicorn -i https://pypi.tuna.tsinghua.edu.cn/simple
# RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
# RUN sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

View File

@ -9,7 +9,7 @@ services:
- ../src:/app/src
- ../saves_dev:/app/saves
- ../src/static/config.dev.yaml:/app/src/static/config.yaml
- ${MODEL_DIR}:${MODEL_DIR} # 如果出现 undefined volume MODEL_DIR: invalid compose project请添加此环境变量或者注释此行
# - ${MODEL_DIR}:${MODEL_DIR} # 如果出现 undefined volume MODEL_DIR: invalid compose project请添加此环境变量或者注释此行
ports:
- "5050:5050"
depends_on:

View File

@ -6,7 +6,8 @@ WORKDIR /app
COPY ./web/package*.json ./
# 安装依赖
RUN npm install --registry https://registry.npmmirror.com --verbose --force
RUN npm install --verbose --force
# RUN npm install --registry http://mirrors.cloud.tencent.com/npm/ --verbose --force
# 复制源代码
COPY ./web .
@ -21,7 +22,8 @@ FROM node:latest AS build-stage
WORKDIR /app
COPY ./web/package*.json ./
RUN npm install --registry https://registry.npmmirror.com --force
RUN npm install --force
# RUN npm install --registry https://registry.npmmirror.com --force
COPY ./web .
RUN npm run build