comic / Dockerfile
deeme's picture
Upload 2 files
9664cdf verified
raw
history blame
593 Bytes
FROM python:3.9-slim
WORKDIR /app
# 安装FFmpeg和Noto Sans CJK SC字体
RUN apt-get update && \
apt-get install -y ffmpeg fonts-noto-cjk fonts-noto-cjk-extra && \
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"]