newturok commited on
Commit
70221ee
·
verified ·
1 Parent(s): 631d24b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -0
Dockerfile ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG CUDA_VERSION="12.1.1"
2
+ ARG CUDNN_VERSION="8"
3
+ ARG UBUNTU_VERSION="22.04"
4
+ ARG DOCKER_FROM=nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION
5
+
6
+ # Base NVidia CUDA Ubuntu image
7
+ FROM $DOCKER_FROM AS base
8
+
9
+ # Install Python plus openssh, which is our minimum set of required packages.
10
+ RUN apt-get update -y && \
11
+ apt-get install -y python3 python3-pip python3-venv && \
12
+ apt-get install -y --no-install-recommends openssh-server openssh-client git git-lfs wget vim zip unzip curl && \
13
+ python3 -m pip install --upgrade pip && \
14
+ apt-get clean && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ # Install nginx
18
+ RUN apt-get update && \
19
+ apt-get install -y nginx
20
+
21
+ # Copy the 'default' configuration file to the appropriate location
22
+ COPY default /etc/nginx/sites-available/default
23
+
24
+ ENV PATH="/usr/local/cuda/bin:${PATH}"
25
+
26
+ # Install pytorch
27
+ ARG PYTORCH="2.4.0"
28
+ ARG CUDA="121"
29
+ RUN pip3 install --no-cache-dir -U torch==$PYTORCH torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu$CUDA
30
+
31
+ COPY --chmod=755 start-ssh-only.sh /start.sh
32
+ COPY --chmod=755 start-original.sh /start-original.sh
33
+ COPY --chmod=755 comfyui-on-workspace.sh /comfyui-on-workspace.sh
34
+ COPY --chmod=755 ai-toolkit-on-workspace.sh /ai-toolkit-on-workspace.sh
35
+ COPY --chmod=755 check_files.sh /check_files.sh
36
+
37
+ # Clone the git repo and install requirements in the same RUN command to ensure they are in the same layer
38
+ RUN git clone https://github.com/comfyanonymous/ComfyUI.git && \
39
+ cd ComfyUI && \
40
+ pip3 install -r requirements.txt && \
41
+ cd custom_nodes && \
42
+ git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \
43
+ git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git && \
44
+ cd /ComfyUI && \
45
+ mkdir pysssss-workflows
46
+
47
+ COPY --chmod=755 start.sh /start.sh
48
+
49
+ WORKDIR /workspace
50
+
51
+ EXPOSE 8188
52
+
53
+ CMD [ "/start.sh" ]