NanoBotAIAgent commited on
Commit
f30aa18
·
verified ·
1 Parent(s): 35a6b39

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ PYTHONUNBUFFERED=1
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ git \
9
+ wget \
10
+ libgl1-mesa-glx \
11
+ libglib2.0-0 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ WORKDIR /app
15
+
16
+ # Clone ComfyUI
17
+ RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \
18
+ pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu && \
19
+ pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Download a small fast model (SD 1.5 pruned EMA-only ~2GB)
22
+ RUN mkdir -p models/checkpoints models/vae models/controlnet && \
23
+ wget -q --show-progress \
24
+ https://huggingface.co/genai-archive/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.fp16.safetensors \
25
+ -O models/checkpoints/v1-5-pruned-emaonly.fp16.safetensors
26
+
27
+ # Expose the port HF Spaces expects
28
+ EXPOSE 7860
29
+
30
+ # Run ComfyUI bound to all interfaces on port 7860
31
+ CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "7860"]