File size: 533 Bytes
bf9e14f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

# 安装 FFmpeg、系统证书(用于访问 HTTPS URL)
RUN apt-get update && apt-get install -y \
    ffmpeg \
    ca-certificates \
    libsm6 \
    libxext6 \
    && rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制项目代码
COPY . .

# 暴露 Hugging Face 默认端口
EXPOSE 7860

# 使用 uvicorn 启动
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]