Nodiw52992 commited on
Commit
907fe4e
·
verified ·
1 Parent(s): dd17e7e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -0
Dockerfile ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM ubuntu:24.04
3
+
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Install essentials
7
+ RUN apt-get update && apt-get install -y \
8
+ python3 python3-venv python3-pip git wget \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /workspace
12
+
13
+ # Clone ComfyUI
14
+ RUN git clone https://github.com/comfyanonymous/ComfyUI.git
15
+
16
+ WORKDIR /workspace/ComfyUI
17
+
18
+ # Set up Python venv & install
19
+ RUN python3 -m venv .venv \
20
+ && . .venv/bin/activate \
21
+ && pip install --upgrade pip \
22
+ && pip install xformers!=0.0.18 \
23
+ && pip install -r requirements.txt
24
+
25
+ # Download Flux.1 Schnell UNET & VAE
26
+ RUN mkdir -p models/unet models/vae \
27
+ && wget -c https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \
28
+ -P models/unet/ \
29
+ && wget -c https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors \
30
+ -P models/vae/
31
+
32
+ # Expose ComfyUI port
33
+ EXPOSE 7860
34
+
35
+ # Launch script
36
+ CMD ["/bin/bash", "-lc", "source .venv/bin/activate && python3 main.py --host 0.0.0.0 --port 7860 --cpu"]