Hanxiaofeng123 commited on
Commit
0218d71
·
verified ·
1 Parent(s): d8379ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -6
Dockerfile CHANGED
@@ -8,17 +8,13 @@ RUN apt-get update && apt-get install -y \
8
  # 安装 PyTorch
9
  RUN pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cpu
10
 
11
- # 安装其他依赖
12
  COPY requirements.txt .
13
- RUN pip install -r requirements.txt
14
 
15
  # 拷贝代码
16
  COPY . /app
17
  WORKDIR /app
18
 
19
- # 创建空的模型文件(仅用于测试)
20
- RUN mkdir -p checkpoint && \
21
- echo "这是一个空的模型文件,请替换为真实的模型" > checkpoint/final_model_K_30.pth
22
-
23
  # 入口
24
  CMD ["python", "app.py"]
 
8
  # 安装 PyTorch
9
  RUN pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cpu
10
 
11
+ # 安装其他依赖和huggingface-hub
12
  COPY requirements.txt .
13
+ RUN pip install -r requirements.txt huggingface-hub
14
 
15
  # 拷贝代码
16
  COPY . /app
17
  WORKDIR /app
18
 
 
 
 
 
19
  # 入口
20
  CMD ["python", "app.py"]