Skip to content

Commit e248024

Browse files
committed
fix: make sure that there are no errors
1 parent 5aa03d7 commit e248024

File tree

1 file changed

+13
-33
lines changed

1 file changed

+13
-33
lines changed

Dockerfile

+13-33
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,40 @@
11
FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04
2+
3+
# Set working directory
24
WORKDIR /content
5+
6+
# Update PATH
37
ENV PATH="/home/camenduru/.local/bin:${PATH}"
48

59
# Add and configure the 'camenduru' user
6-
RUN adduser --disabled-password --gecos '' camenduru && \
7-
adduser camenduru sudo && \
8-
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
9-
chown -R camenduru:camenduru /content && \
10-
chmod -R 755 /content && \
11-
chown -R camenduru:camenduru /home && \
12-
chmod -R 755 /home && \
13-
apt update -y && \
14-
add-apt-repository -y ppa:git-core/ppa && \
15-
apt update -y && \
16-
apt install -y aria2 git git-lfs unzip ffmpeg
10+
RUN adduser --disabled-password --gecos '' camenduru && adduser camenduru sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && chown -R camenduru:camenduru /content && chmod -R 755 /content && chown -R camenduru:camenduru /home && chmod -R 755 /home && apt update -y && add-apt-repository -y ppa:git-core/ppa && apt update -y && apt install -y aria2 git git-lfs unzip ffmpeg
1711

12+
# Switch to the 'camenduru' user
1813
USER camenduru
1914

2015
# Install Python dependencies
21-
RUN pip install -q opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod \
22-
xformers==0.0.25 torchsde==0.2.6 einops==0.8.0 diffusers==0.28.0 transformers==4.41.2 accelerate==0.30.1
16+
RUN pip install -q opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod xformers==0.0.25 torchsde==0.2.6 einops==0.8.0 diffusers==0.28.0 transformers==4.41.2 accelerate==0.30.1
2317

2418
# Clone the ComfyUI repository
2519
RUN git clone https://github.com/comfyanonymous/ComfyUI /content/ComfyUI
2620

2721
# Download and place the UNet model
28-
RUN mkdir -p /content/ComfyUI/models/unet && \
29-
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M \
30-
https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/flux1-dev.sft \
31-
-d /content/ComfyUI/models/unet -o flux1-dev.sft
22+
RUN mkdir -p /content/ComfyUI/models/unet && aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/flux1-dev.sft" -d /content/ComfyUI/models/unet -o flux1-dev.sft
3223

3324
# Download and place the CLIP models
34-
RUN mkdir -p /content/ComfyUI/models/clip && \
35-
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M \
36-
https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/clip_l.safetensors \
37-
-d /content/ComfyUI/models/clip -o clip_l.safetensors && \
38-
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M \
39-
https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/t5xxl_fp16.safetensors \
40-
-d /content/ComfyUI/models/clip -o t5xxl_fp16.safetensors
25+
RUN mkdir -p /content/ComfyUI/models/clip && aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/clip_l.safetensors" -d /content/ComfyUI/models/clip -o clip_l.safetensors && aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/t5xxl_fp16.safetensors" -d /content/ComfyUI/models/clip -o t5xxl_fp16.safetensors
4126

4227
# Download and place the VAE model
43-
RUN mkdir -p /content/ComfyUI/models/vae && \
44-
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M \
45-
https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/ae.sft \
46-
-d /content/ComfyUI/models/vae -o ae.sft
28+
RUN mkdir -p /content/ComfyUI/models/vae && aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/ae.sft" -d /content/ComfyUI/models/vae -o ae.sft
4729

4830
# Download and place the LoRa model
49-
RUN mkdir -p /content/ComfyUI/models/loras && \
50-
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M \
51-
https://civitai.com/api/download/models/896422?type=Model&format=SafeTensor \
52-
-d /content/ComfyUI/models/loras -o zanshou-kin-flux-ueno-manga-style.safetensors
31+
RUN mkdir -p /content/ComfyUI/models/loras && aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://civitai.com/api/download/models/896422?type=Model&format=SafeTensor" -d /content/ComfyUI/models/loras -o zanshou-kin-flux-ueno-manga-style.safetensors
5332

5433
# Copy the worker script into the container
5534
COPY ./worker_runpod.py /content/ComfyUI/worker_runpod.py
5635

36+
# Set working directory to ComfyUI
5737
WORKDIR /content/ComfyUI
5838

5939
# Define the command to run the worker
60-
CMD python worker_runpod.py
40+
CMD ["python", "worker_runpod.py"]

0 commit comments

Comments
 (0)