File size: 433 Bytes
e4dca24
b570cf2
f623da8
b570cf2
 
 
 
7d1bae5
b570cf2
 
c774086
b570cf2
0218d71
b570cf2
f623da8
6323816
b570cf2
 
e51d2e3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10-slim

# 安装系统依赖
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# 安装 PyTorch
RUN pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cpu

# 安装其他依赖
COPY requirements.txt .
RUN pip install -r requirements.txt huggingface-hub

# 拷贝代码
COPY . /app
WORKDIR /app

# 入口
CMD ["python", "app.py"]