This commit is contained in:
aaron 2025-04-29 00:39:06 +08:00
parent 14df26ab8f
commit 3a8ac86094

View File

@ -12,13 +12,13 @@ RUN apt-get update && apt-get install -y \
# 复制项目文件 # 复制项目文件
COPY . /app/ COPY . /app/
# 创建虚拟环境, 先判断是否存在 # # 创建虚拟环境, 先判断是否存在
RUN if [ ! -d "venv" ]; then \ # RUN if [ ! -d "venv" ]; then \
python -m venv venv; \ # python -m venv venv; \
fi # fi
# 激活虚拟环境 # # 激活虚拟环境
RUN source venv/bin/activate # RUN source venv/bin/activate
# 安装setuptools # 安装setuptools
RUN pip install setuptools RUN pip install setuptools