comic / Dockerfile
deeme's picture
Upload 2 files
6a725e3 verified
raw
history blame contribute delete
554 Bytes
FROM python:3.9-slim
WORKDIR /app
# 安装FFmpeg
RUN apt-get update && \
apt-get install -y ffmpeg \
fonts-noto-cjk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# 安装Python依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建必要的目录
RUN mkdir -p temp && chmod 777 temp
RUN mkdir -p storage && chmod 777 storage
# 暴露端口
EXPOSE 8000
# 运行应用
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]