File size: 405 Bytes
90ecd54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 使用官方 Python 运行时作为基础镜像
FROM python:3.9-slim-buster

# 设置工作目录
WORKDIR /app

# 将当前目录的内容复制到容器的 /app 目录中
COPY . /app

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

# 暴露端口 (Hugging Face Spaces 使用 7860 作为默认端口)
EXPOSE 7860

# 运行 app.py
CMD ["python", "app.py"]