Update Dockerfile
Browse files- Dockerfile +11 -12
Dockerfile
CHANGED
|
@@ -1,29 +1,28 @@
|
|
| 1 |
# syntax=docker/dockerfile:1.4
|
| 2 |
FROM ubuntu:24.04
|
| 3 |
-
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
|
| 9 |
WORKDIR /workspace
|
| 10 |
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
|
| 11 |
WORKDIR /workspace/ComfyUI
|
| 12 |
|
| 13 |
-
RUN python3 -m venv .venv && \
|
| 14 |
-
|
| 15 |
-
pip install --upgrade pip && \
|
| 16 |
-
pip install xformers!=0.0.18 && \
|
| 17 |
pip install -r requirements.txt
|
| 18 |
|
| 19 |
-
RUN --mount=type=secret,id=
|
| 20 |
mkdir -p models/unet models/vae && \
|
| 21 |
-
|
|
|
|
| 22 |
https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \
|
| 23 |
-O models/unet/flux1-schnell.safetensors && \
|
| 24 |
-
wget --header="Authorization: Bearer $
|
| 25 |
https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors \
|
| 26 |
-O models/vae/ae.safetensors
|
| 27 |
|
| 28 |
EXPOSE 7860
|
| 29 |
-
|
|
|
|
|
|
| 1 |
# syntax=docker/dockerfile:1.4
|
| 2 |
FROM ubuntu:24.04
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y python3-venv python3-pip git wget && \
|
| 6 |
+
rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
WORKDIR /workspace
|
| 9 |
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
|
| 10 |
WORKDIR /workspace/ComfyUI
|
| 11 |
|
| 12 |
+
RUN python3 -m venv .venv && . .venv/bin/activate && \
|
| 13 |
+
pip install --upgrade pip && pip install xformers!=0.0.18 && \
|
|
|
|
|
|
|
| 14 |
pip install -r requirements.txt
|
| 15 |
|
| 16 |
+
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 17 |
mkdir -p models/unet models/vae && \
|
| 18 |
+
hf=$(cat /run/secrets/HF_TOKEN) && \
|
| 19 |
+
wget --header="Authorization: Bearer $hf" \
|
| 20 |
https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \
|
| 21 |
-O models/unet/flux1-schnell.safetensors && \
|
| 22 |
+
wget --header="Authorization: Bearer $hf" \
|
| 23 |
https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors \
|
| 24 |
-O models/vae/ae.safetensors
|
| 25 |
|
| 26 |
EXPOSE 7860
|
| 27 |
+
|
| 28 |
+
CMD ["bash", "-lc", "source .venv/bin/activate && python3 main.py --host 0.0.0.0 --port 7860 --cpu"]
|