seawolf2357 commited on
Commit
de7a474
·
verified ·
1 Parent(s): a914313

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -9
Dockerfile CHANGED
@@ -1,10 +1,8 @@
1
  FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
2
 
3
- # 设置非交互式安装并避免不必要的包
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  ENV TZ=Asia/Shanghai
6
 
7
- # 安装基本工具和Python
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
  python3 \
@@ -15,28 +13,21 @@ RUN apt-get update && apt-get install -y \
15
  && apt-get clean \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # 设置工作目录
19
  WORKDIR /app
20
 
21
- # 复制需要的文件
22
  COPY requirements.txt ./
23
  COPY app.py ./
24
  COPY setup.sh ./
25
  COPY README.md ./
26
  COPY diffusers_helper ./diffusers_helper
27
 
28
- # 安装Python依赖
29
  RUN pip3 install --no-cache-dir -r requirements.txt
30
 
31
- # 创建需要的目录
32
  RUN mkdir -p /app/outputs
33
  RUN mkdir -p /app/hf_download
34
 
35
- # 设置权限
36
  RUN chmod +x setup.sh
37
 
38
- # 设置环境变量
39
  ENV HF_HOME=/app/hf_download
40
 
41
- # 运行应用
42
  CMD ["python3", "app.py"]
 
1
  FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV TZ=Asia/Shanghai
5
 
 
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  python3 \
 
13
  && apt-get clean \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
16
  WORKDIR /app
17
 
 
18
  COPY requirements.txt ./
19
  COPY app.py ./
20
  COPY setup.sh ./
21
  COPY README.md ./
22
  COPY diffusers_helper ./diffusers_helper
23
 
 
24
  RUN pip3 install --no-cache-dir -r requirements.txt
25
 
 
26
  RUN mkdir -p /app/outputs
27
  RUN mkdir -p /app/hf_download
28
 
 
29
  RUN chmod +x setup.sh
30
 
 
31
  ENV HF_HOME=/app/hf_download
32
 
 
33
  CMD ["python3", "app.py"]