Nine7 / Dockerfile
ljx77qaq's picture
Update Dockerfile
2439513 verified
Raw
History Blame Contribute Delete
612 Bytes
# 使用官方的 Python 3.10 镜像作为基础环境
FROM python:3.10
# 安装 ffmpeg(视频缩略图提取需要)
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg && \
rm -rf /var/lib/apt/lists/*
# 设置工作目录
WORKDIR /app
# 先复制 requirements.txt 并安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 将当前目录下的所有文件 (包括 app.py) 复制到容器的 /app 目录下
COPY . .
# 暴露抱脸要求的 7860 端口
EXPOSE 7860
# 告诉系统启动时运行哪条命令
CMD ["python", "-u", "app.py"]