koenverhagen commited on
Commit
e2bbe2b
1 Parent(s): 51370fe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -12
Dockerfile CHANGED
@@ -1,26 +1,67 @@
1
  # Dockerfile Public A10G
2
 
3
- # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
4
- # FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
5
- # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/base/Dockerfile
6
  FROM nvidia/cuda:11.7.1-base-ubuntu22.04
 
 
7
  ENV DEBIAN_FRONTEND noninteractive
8
 
9
- RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
10
 
 
11
  WORKDIR /
12
 
13
-
14
  RUN pip3 install --upgrade pip
15
- # RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
16
- RUN pip install --pre triton
17
- RUN pip install numexpr torchmetrics==0.11.4
18
 
 
 
 
 
 
 
 
 
 
19
  EXPOSE 7860
20
 
21
- set COMMANDLINE_ARGS=--api
22
- # RUN python launch.py --skip-torch-cuda-test --num_cpu_threads_per_process=6 --api
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- # CMD python webui.py --api --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file
25
 
26
- CMD webui-user.bat --opt-sdp-no-mem-attention --no-half-vae --opt-channelslast
 
1
  # Dockerfile Public A10G
2
 
3
+ # Use an NVIDIA CUDA base image with Ubuntu 22.04
 
 
4
  FROM nvidia/cuda:11.7.1-base-ubuntu22.04
5
+
6
+ # Set noninteractive to avoid interactive prompts during the build process
7
  ENV DEBIAN_FRONTEND noninteractive
8
 
9
+ # Update the package repository and install necessary packages
10
+ RUN apt-get update -y \
11
+ && apt-get upgrade -y \
12
+ && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 \
13
+ # Clean up to reduce image size
14
+ && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Set the working directory
17
  WORKDIR /
18
 
19
+ # Upgrade pip to the latest version
20
  RUN pip3 install --upgrade pip
 
 
 
21
 
22
+ # Install a specific version of PyTorch compatible with xFormers
23
+ # This may need to be adjusted based on CUDA version compatibility
24
+ RUN pip3 install torch==2.0.1+cu118 -f https://download.pytorch.org/whl/torch_stable.html
25
+
26
+ # Install specific versions of other dependencies as needed
27
+ RUN pip install --pre triton \
28
+ && pip install numexpr torchmetrics==0.11.4
29
+
30
+ # Expose port 7860 for web service
31
  EXPOSE 7860
32
 
33
+ # Set environment variable for command line arguments
34
+ ENV COMMANDLINE_ARGS=--api
35
+
36
+ # Command to run the application
37
+ CMD ["python", "webui.py", "--api", "--xformers", "--listen", "--disable-console-progressbars", "--enable-console-prompts", "--no-progressbar-hiding", "--ui-config-file", "webui-user.bat", "--opt-sdp-no-mem-attention", "--no-half-vae", "--opt-channelslast"]
38
+
39
+
40
+
41
+ # original Dockerfile
42
+ # # Dockerfile Public A10G
43
+
44
+ # # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
45
+ # # FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
46
+ # # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/base/Dockerfile
47
+ # FROM nvidia/cuda:11.7.1-base-ubuntu22.04
48
+ # ENV DEBIAN_FRONTEND noninteractive
49
+
50
+ # RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
51
+
52
+ # WORKDIR /
53
+
54
+
55
+ # RUN pip3 install --upgrade pip
56
+ # # RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
57
+ # RUN pip install --pre triton
58
+ # RUN pip install numexpr torchmetrics==0.11.4
59
+
60
+ # EXPOSE 7860
61
+
62
+ # set COMMANDLINE_ARGS=--api
63
+ # # RUN python launch.py --skip-torch-cuda-test --num_cpu_threads_per_process=6 --api
64
 
65
+ # # CMD python webui.py --api --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file
66
 
67
+ # CMD webui-user.bat --opt-sdp-no-mem-attention --no-half-vae --opt-channelslast