File size: 666 Bytes
b645e95
47a96bf
 
b645e95
47a96bf
667dfcc
b645e95
 
667dfcc
47a96bf
b645e95
 
47a96bf
b645e95
 
 
 
 
47a96bf
b645e95
 
47a96bf
b645e95
667dfcc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 使用 Hugging Face 官方 CPU 镜像
FROM huggingface/space-python3.10-cpu

# 安装系统依赖
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    ffmpeg \  # 视频处理核心工具
    git     # 用于拉取子模块
    && rm -rf /var/lib/apt/lists/*

# 配置子模块(强制 HTTPS)
RUN git config --global url."https://github.com".insteadOf "git@github.com:"

# 复制代码并初始化子模块
COPY . /app
WORKDIR /app
RUN git submodule init && \
    git submodule update --recursive  # 递归拉取子模块

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

# 启动命令
CMD ["python", "app.py"]