Files
video-flow/Dockerfile

38 lines
787 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Video Flow - Python 后端 Dockerfile
FROM python:3.11-slim
# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
fonts-noto-cjk \
fonts-wqy-zenhei \
curl \
&& rm -rf /var/lib/apt/lists/*
# 设置工作目录
WORKDIR /app
# 复制依赖文件
COPY requirements.txt .
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建必要的目录
RUN mkdir -p /app/output /app/temp /app/assets
# 暴露端口
# - 8000: FastAPI
# - 8503: Streamlitdocker-compose.yml 中运行在 85038502 是历史 runtime 标识)
EXPOSE 8000 8503
# 默认命令
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]