Spaces:
Sleeping
Sleeping
# 使用官方 Python 镜像作为基础镜像 | |
FROM python:3.9-slim | |
# 设置工作目录 | |
WORKDIR /app | |
# 复制 requirements.txt 并安装依赖 | |
COPY requirements.txt requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# 复制当前目录的内容到工作目录 | |
COPY . . | |
# 暴露应用程序端口 | |
EXPOSE 7860 | |
# 运行 Flask 应用程序 | |
CMD ["python", "app.py"] | |