Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829# syntax=docker/dockerfile:1.4FROM ubuntu:24.04ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get update && apt-get install -y \python3 python3-venv python3-pip git wget \&& rm -rf /var/lib/apt/lists/*WORKDIR /workspaceRUN git clone https://github.com/comfyanonymous/ComfyUI.gitWORKDIR /workspace/ComfyUIRUN python3 -m venv .venv && \. .venv/bin/activate && \pip install --upgrade pip && \pip install xformers!=0.0.18 && \pip install -r requirements.txtRUN --mount=type=secret,id=hf_token,required=true \mkdir -p models/unet models/vae && \wget --header="Authorization: Bearer $(cat /run/secrets/hf_token)" \https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \-O models/unet/flux1-schnell.safetensors && \wget --header="Authorization: Bearer $(cat /run/secrets/hf_token)" \https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors \-O models/vae/ae.safetensorsEXPOSE 7860CMD ["/bin/bash", "-lc", "source .venv/bin/activate && python3 main.py --host 0.0.0.0 --port 7860 --cpu"]12345678910111213141516171819202122232425262728# syntax=docker/dockerfile:1.4FROM ubuntu:24.04ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get update && apt-get install -y python3-venv python3-pip git wget && \rm -rf /var/lib/apt/lists/*WORKDIR /workspaceRUN git clone https://github.com/comfyanonymous/ComfyUI.gitWORKDIR /workspace/ComfyUIRUN python3 -m venv .venv && . .venv/bin/activate && \pip install --upgrade pip && pip install xformers!=0.0.18 && \pip install -r requirements.txtRUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \mkdir -p models/unet models/vae && \hf=$(cat /run/secrets/HF_TOKEN) && \wget --header="Authorization: Bearer $hf" \https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \-O models/unet/flux1-schnell.safetensors && \wget --header="Authorization: Bearer $hf" \https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors \-O models/vae/ae.safetensorsEXPOSE 7860CMD ["bash", "-lc", "source .venv/bin/activate && python3 main.py --host 0.0.0.0 --port 7860 --cpu"]
Dockerfile+11-12