keyframe / dockerfile
zijian2022's picture
Update dockerfile
7b84d0d verified
raw
history blame
600 Bytes
# 使用轻量级的 Python 镜像
FROM python:3.9-slim
# 安装一些系统依赖,支持 OpenCV、Dash、视频处理等
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# 设置工作目录
WORKDIR /app
# 将当前目录下的所有文件复制到容器中
COPY . /app
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 设置环境变量,指定容器监听的端口
ENV PORT=7860
ENV HOST=0.0.0.0
# 启动 Dash 应用(你也可以使用 gunicorn 等其他方式)
CMD ["python", "w52.py"]