This commit is contained in:
jeremygan2021
2026-03-04 19:16:25 +08:00
parent a810d70a22
commit 4c8e3a1a8d
4 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖
# ffmpeg: 用于音频格式转换
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制项目文件
COPY . .
# 创建输出目录
RUN mkdir -p output_images
# 暴露端口
EXPOSE 8000
# 启动命令
CMD ["python", "server.py"]