wixcs commited on
Commit
1cd2041
·
verified ·
1 Parent(s): 94fd9ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -3
Dockerfile CHANGED
@@ -17,9 +17,19 @@
17
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
18
  # 使用官方 Nginx 基础镜像
19
  # 使用官方 Python 运行时作为父镜像
20
- FROM exwjk/kasm:ubuntu-xfce-3
21
- USER root
22
- RUN chmod -R 755 /
23
 
 
 
24
 
 
 
 
 
 
 
 
 
 
25
 
 
17
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
18
  # 使用官方 Nginx 基础镜像
19
  # 使用官方 Python 运行时作为父镜像
20
+ # 使用支持 CUDA 的基础镜像, 如果你选择了 CPU 硬件, 则可以去掉 -cuda
21
+ FROM pytorch/pytorch:2.2.1
 
22
 
23
+ # 设置工作目录
24
+ WORKDIR /app
25
 
26
+ # 安装 Python 包
27
+ COPY requirements.txt ./
28
+ RUN pip install --no-cache-dir -r requirements.txt
29
+
30
+ # 将项目文件复制到容器中
31
+ COPY . .
32
+
33
+ # 设定启动命令
34
+ CMD ["python", "app.py"]
35