|
FROM cnstark/pytorch:2.0.1-py3.10.11-ubuntu22.04 |
|
|
|
RUN apt-get update && apt-get install -y git |
|
|
|
|
|
RUN useradd -rm -d /home/hf -s /bin/bash -g root -G sudo -u 1001 hf |
|
USER hf |
|
|
|
ENV TRANSFORMERS_CACHE /tmp |
|
ENV HF_HOME /tmp |
|
|
|
WORKDIR /home/hf |
|
|
|
RUN mkdir /tmp/comfy_out |
|
|
|
RUN git clone https://github.com/comfyanonymous/ComfyUI |
|
WORKDIR /home/hf/ComfyUI |
|
|
|
ENV VIRTUAL_ENV=/home/hf/ComfyUI/venv |
|
RUN python3 -m venv $VIRTUAL_ENV |
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH" |
|
|
|
RUN pip install -r requirements.txt |
|
|
|
RUN wget -nv -c https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors -P ./models/checkpoints/ |
|
RUN wget -nv -c https://huggingface.co/openskyml/lcm-lora-sdxl-turbo/resolve/main/lcm-lora-sdxl-turbo.safetensors -P ./models/loras/ |
|
RUN wget -nv -c https://huggingface.co/kataragi/SDXL-turbo-LoRA/resolve/main/sd_xl_turbo_lora_rank64.safetensors -P ./models/loras/ |
|
RUN wget -nv -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/ |
|
RUN wget -nv -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P ./models/upscale_models/ |
|
|
|
RUN mkdir temp && chmod 777 temp |
|
|
|
|
|
CMD ["python", "main.py", "--cpu", "--listen", "0.0.0.0", "--port", "7860", "--output-directory", "./temp"] |
|
|