This commit is contained in:
aaron 2025-04-29 00:38:22 +08:00
parent 3547ab677c
commit 14df26ab8f

View File

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