File size: 570 Bytes
2005bca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.11-slim

# 安装 git
RUN apt-get update && apt-get install -y git && apt-get clean

# 设置工作目录
WORKDIR /app

# 设置Python环境
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=utf-8

# 克隆 GitHub 仓库
RUN git clone https://github.com/1hei1/sora-api.git .

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

# 创建必要的目录
RUN mkdir -p /app/src/static/images && \
    chmod -R 777 /app/src/static

RUN chmod -R 777 /app

# 暴露端口
EXPOSE 7860

# 启动应用
CMD ["python", "run.py"]