Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +11 -8
Dockerfile
CHANGED
@@ -1,17 +1,20 @@
|
|
1 |
-
#
|
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
|
|
|
|
|
|
|
12 |
|
13 |
-
# 安装
|
|
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
#
|
17 |
-
CMD ["
|
|
|
|
|
|
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 |
+
|