This commit is contained in:
jeremygan2021
2025-11-26 19:22:05 +08:00
parent 371d959646
commit 45bb0a4d41
5 changed files with 226 additions and 6 deletions

View File

@@ -11,8 +11,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# 使用国内pip镜像源
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
pip config set global.trusted-host mirrors.aliyun.com
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
# pip config set global.trusted-host mirrors.aliyun.com
# 使用国内apt镜像源
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
@@ -24,7 +24,7 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debia
# 复制requirements文件并安装Python依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# 复制项目文件
COPY . .
@@ -36,4 +36,4 @@ RUN mkdir -p static/uploads static/processed
EXPOSE 9999
# 启动命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9999"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3199"]