neuroama commited on
Commit
18c4057
·
1 Parent(s): e6ccae6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,17 +1,20 @@
1
- # 使用官方 PyTorch 镜像作为基础镜像
2
  FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
3
 
4
  # 安装 Git
5
  RUN apt-get update && apt-get install -y git
6
 
7
- # 克隆 Transformers 仓库
8
- RUN git clone https://github.com/huggingface/transformers.git /workspace/transformers
9
-
10
  # 设置工作目录
11
- WORKDIR /workspace/transformers
 
 
 
12
 
13
- # 安装 Transformers 依赖
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # 定义容器启动时运行的命令
17
- CMD ["bash"]
 
 
 
1
+ # 使用 Hugging Face 的 PyTorch 容器作为基础镜像
2
  FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
3
 
4
  # 安装 Git
5
  RUN apt-get update && apt-get install -y git
6
 
 
 
 
7
  # 设置工作目录
8
+ WORKDIR /workspace
9
+
10
+ # 克隆 Gradio 示例项目
11
+ RUN git clone https://github.com/gradio-app/hello-world-gradio.git
12
 
13
+ # 安装 Gradio 示例项目依赖
14
+ WORKDIR /workspace/hello-world-gradio
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # 设置容器启动时运行的命令
18
+ CMD ["python", "app.py"]
19
+
20
+