File size: 489 Bytes
f80e2cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 使用官方 Python 运行时作为基础镜像
FROM python:3.10-slim

# 设置工作目录
WORKDIR /app

# 安装 git(因为你需要 clone repo)
RUN apt-get update && apt-get install -y git && apt-get clean

# 克隆项目
RUN git clone https://github.com/TheSmallHanCat/sora2api.git .

# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt

# 暴露服务端口(按你的 main.py 设置修改,假设为 8000)
EXPOSE 8000

# 启动服务
CMD ["python", "main.py"]