| | |
| | FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 as base |
| |
|
| | ARG WEBUI_VERSION=v1.7.0 |
| | ARG DREAMBOOTH_COMMIT=cf086c536b141fc522ff11f6cffc8b7b12da04b9 |
| | ARG KOHYA_VERSION=v22.3.1 |
| |
|
| | SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
| | ENV DEBIAN_FRONTEND=noninteractive \ |
| | TZ=Europe/London \ |
| | PYTHONUNBUFFERED=1 \ |
| | SHELL=/bin/bash |
| |
|
| | |
| | WORKDIR / |
| |
|
| | |
| | RUN apt update && \ |
| | apt -y upgrade && \ |
| | apt install -y --no-install-recommends \ |
| | build-essential \ |
| | software-properties-common \ |
| | python3.10-venv \ |
| | python3-pip \ |
| | python3-tk \ |
| | python3-dev \ |
| | nodejs \ |
| | npm \ |
| | bash \ |
| | dos2unix \ |
| | git \ |
| | git-lfs \ |
| | ncdu \ |
| | nginx \ |
| | net-tools \ |
| | inetutils-ping \ |
| | openssh-server \ |
| | libglib2.0-0 \ |
| | libsm6 \ |
| | libgl1 \ |
| | libxrender1 \ |
| | libxext6 \ |
| | ffmpeg \ |
| | wget \ |
| | curl \ |
| | psmisc \ |
| | rsync \ |
| | vim \ |
| | zip \ |
| | unzip \ |
| | p7zip-full \ |
| | htop \ |
| | pkg-config \ |
| | plocate \ |
| | libcairo2-dev \ |
| | libgoogle-perftools4 \ |
| | libtcmalloc-minimal4 \ |
| | apt-transport-https \ |
| | ca-certificates && \ |
| | update-ca-certificates && \ |
| | apt clean && \ |
| | rm -rf /var/lib/apt/lists/* && \ |
| | echo "en_US.UTF-8 UTF-8" > /etc/locale.gen |
| |
|
| | |
| | RUN ln -s /usr/bin/python3.10 /usr/bin/python |
| |
|
| | |
| | RUN pip3 install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \ |
| | pip3 install --no-cache-dir xformers==0.0.22 tensorrt |
| | |
| | |
| | |
| | FROM base as setup |
| | |
| | RUN mkdir -p /sd-models |
| | |
| | |
| | |
| | |
| | |
| | |
| | COPY famousai-v2.safetensors /sd-models/sd_xl_base_1.0.safetensors |
| | COPY sd_xl_refiner_1.0.safetensors /sd-models/sd_xl_refiner_1.0.safetensors |
| | COPY sdxl_vae.safetensors /sd-models/sdxl_vae.safetensors |
| | COPY woman_5200_imgs_1024x1024.zip /sd-models/woman_5200_imgs_1024x1024.zip |
| | COPY man_5200_imgs_1024x1024.zip /sd-models/man_5200_imgs_1024x1024.zip |
| | COPY 24GB_TextEncoder.json /sd-models/24GB_TextEncoder.json |
| | COPY 48GB_TextEncoder.json /sd-models/48GB_TextEncoder.json |
| | |
| | RUN unzip /sd-models/man_5200_imgs_1024x1024.zip -d /sd-models/man && \ |
| | unzip /sd-models/woman_5200_imgs_1024x1024.zip -d /sd-models/woman && \ |
| | rm /sd-models/man_5200_imgs_1024x1024.zip && \ |
| | rm /sd-models/woman_5200_imgs_1024x1024.zip |
| | |
| | |
| | |
| | WORKDIR / |
| | RUN git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && \ |
| | cd /stable-diffusion-webui && \ |
| | git checkout tags/${WEBUI_VERSION} |
| |
|
| | WORKDIR /stable-diffusion-webui |
| | RUN python3 -m venv --system-site-packages /venv && \ |
| | source /venv/bin/activate && \ |
| | pip3 install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \ |
| | pip3 install --no-cache-dir xformers && \ |
| | deactivate |
| | |
| | |
| | COPY a1111/requirements.txt a1111/requirements_versions.txt ./ |
| | COPY a1111/cache-sd-model.py a1111/install-automatic.py ./ |
| | RUN source /venv/bin/activate && \ |
| | python3 -m install-automatic --skip-torch-cuda-test && \ |
| | deactivate |
| | |
| | |
| | |
| | RUN source /venv/bin/activate && \ |
| | python3 cache-sd-model.py --no-half-vae --use-cpu=all --ckpt /sd-models/sd_xl_base_1.0.safetensors && \ |
| | python3 cache-sd-model.py --no-half-vae --use-cpu=all --ckpt /sd-models/sd_xl_refiner_1.0.safetensors && \ |
| | deactivate |
| | |
| | |
| | RUN git clone https://github.com/d8ahazard/sd_dreambooth_extension.git extensions/sd_dreambooth_extension && \ |
| | git clone --depth=1 https://github.com/deforum-art/sd-webui-deforum.git extensions/deforum && \ |
| | git clone --depth=1 https://github.com/Mikubill/sd-webui-controlnet.git extensions/sd-webui-controlnet && \ |
| | git clone --depth=1 https://github.com/ashleykleynhans/a1111-sd-webui-locon.git extensions/a1111-sd-webui-locon && \ |
| | git clone --depth=1 https://github.com/Gourieff/sd-webui-reactor.git extensions/sd-webui-reactor && \ |
| | git clone --depth=1 https://github.com/zanllp/sd-webui-infinite-image-browsing.git extensions/infinite-image-browsing && \ |
| | git clone --depth=1 https://github.com/Uminosachi/sd-webui-inpaint-anything.git extensions/inpaint-anything && \ |
| | git clone --depth=1 https://github.com/Bing-su/adetailer.git extensions/adetailer && \ |
| | git clone --depth=1 https://github.com/civitai/sd_civitai_extension.git extensions/sd_civitai_extension && \ |
| | git clone --depth=1 https://github.com/BlafKing/sd-civitai-browser-plus.git extensions/sd-civitai-browser-plus |
| | |
| | |
| | |
| | RUN source /venv/bin/activate && \ |
| | cd /stable-diffusion-webui/extensions/deforum && \ |
| | pip3 install -r requirements.txt && \ |
| | cd /stable-diffusion-webui/extensions/sd-webui-controlnet && \ |
| | pip3 install -r requirements.txt && \ |
| | cd /stable-diffusion-webui/extensions/sd-webui-reactor && \ |
| | pip3 install -r requirements.txt && \ |
| | pip3 install onnxruntime-gpu && \ |
| | cd /stable-diffusion-webui/extensions/infinite-image-browsing && \ |
| | pip3 install -r requirements.txt && \ |
| | cd /stable-diffusion-webui/extensions/adetailer && \ |
| | python3 -m install && \ |
| | cd /stable-diffusion-webui/extensions/sd_civitai_extension && \ |
| | pip3 install -r requirements.txt && \ |
| | deactivate |
| | |
| | |
| | RUN source /venv/bin/activate && \ |
| | pip3 install segment_anything lama_cleaner && \ |
| | deactivate |
| | |
| | |
| | RUN source /venv/bin/activate && \ |
| | cd /stable-diffusion-webui/extensions/sd-civitai-browser-plus && \ |
| | pip3 install send2trash ZipUnicode fake-useragent && \ |
| | deactivate |
| | |
| | |
| | WORKDIR /stable-diffusion-webui/extensions/sd_dreambooth_extension |
| | RUN git checkout main && \ |
| | git reset ${DREAMBOOTH_COMMIT} --hard |
| | |
| | |
| | WORKDIR /stable-diffusion-webui |
| | COPY a1111/requirements_dreambooth.txt ./requirements.txt |
| | RUN source /venv/bin/activate && \ |
| | cd /stable-diffusion-webui/extensions/sd_dreambooth_extension && \ |
| | pip3 install -r requirements.txt && \ |
| | deactivate |
| | |
| | |
| | RUN mkdir -p /stable-diffusion-webui/models/insightface && \ |
| | cd /stable-diffusion-webui/models/insightface && \ |
| | wget https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx |
| |
|
| | |
| | RUN echo "CUDA" > /stable-diffusion-webui/extensions/sd-webui-reactor/last_device.txt |
| |
|
| | |
| | RUN source /venv/bin/activate && \ |
| | pip3 uninstall -y tensorboard tb-nightly && \ |
| | pip3 install tensorboard tensorflow && \ |
| | pip3 cache purge && \ |
| | deactivate |
| |
|
| | |
| | RUN git clone https://github.com/bmaltais/kohya_ss.git /kohya_ss |
| | WORKDIR /kohya_ss |
| | COPY kohya_ss/requirements* ./ |
| | RUN git checkout ${KOHYA_VERSION} && \ |
| | python3 -m venv --system-site-packages venv && \ |
| | source venv/bin/activate && \ |
| | pip3 install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \ |
| | pip3 install --no-cache-dir xformers==0.0.22 \ |
| | bitsandbytes==0.41.1 \ |
| | tensorboard==2.14.1 \ |
| | tensorflow==2.14.0 \ |
| | wheel \ |
| | scipy \ |
| | tensorrt && \ |
| | pip3 install -r requirements.txt && \ |
| | pip3 install . && \ |
| | pip3 cache purge && \ |
| | deactivate |
| |
|
| | |
| | RUN git clone https://github.com/comfyanonymous/ComfyUI.git /ComfyUI |
| | WORKDIR /ComfyUI |
| | RUN python3 -m venv --system-site-packages venv && \ |
| | source venv/bin/activate && \ |
| | pip3 install --no-cache-dir torch==2.0.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \ |
| | pip3 install --no-cache-dir xformers==0.0.22 && \ |
| | pip3 install -r requirements.txt && \ |
| | deactivate |
| |
|
| | |
| | RUN git clone https://github.com/ltdrdata/ComfyUI-Manager.git custom_nodes/ComfyUI-Manager && \ |
| | cd custom_nodes/ComfyUI-Manager && \ |
| | source /ComfyUI/venv/bin/activate && \ |
| | pip3 install -r requirements.txt && \ |
| | pip3 cache purge && \ |
| | deactivate |
| | |
| | |
| | WORKDIR / |
| | RUN git clone https://github.com/ashleykleynhans/app-manager.git /app-manager && \ |
| | cd /app-manager && \ |
| | npm install |
| |
|
| | |
| | WORKDIR / |
| | RUN pip3 install -U --no-cache-dir jupyterlab \ |
| | jupyterlab_widgets \ |
| | ipykernel \ |
| | ipywidgets \ |
| | gdown |
| |
|
| | |
| | RUN curl https://rclone.org/install.sh | bash |
| | |
| | |
| | RUN wget https://github.com/runpod/runpodctl/releases/download/v1.10.0/runpodctl-linux-amd -O runpodctl && \ |
| | chmod a+x runpodctl && \ |
| | mv runpodctl /usr/local/bin |
| |
|
| | |
| | RUN curl https://getcroc.schollz.com | bash |
| | |
| | |
| | RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash && \ |
| | apt install speedtest |
| |
|
| | |
| | RUN git clone --depth=1 https://github.com/ashleykleynhans/civitai-downloader.git && \ |
| | mv civitai-downloader/download.sh /usr/local/bin/download-model && \ |
| | chmod +x /usr/local/bin/download-model |
| | |
| | |
| | COPY a1111/relauncher.py a1111/webui-user.sh a1111/config.json a1111/ui-config.json /stable-diffusion-webui/ |
| | |
| | |
| | ADD https://raw.githubusercontent.com/Douleb/SDXL-750-Styles-GPT4-/main/styles.csv /stable-diffusion-webui/styles.csv |
| |
|
| | |
| | COPY comfyui/extra_model_paths.yaml /ComfyUI/ |
| |
|
| | |
| | RUN rm -f /etc/ssh/ssh_host_* |
| |
|
| | |
| | COPY nginx/nginx.conf /etc/nginx/nginx.conf |
| | COPY nginx/502.html /usr/share/nginx/html/502.html |
| | COPY nginx/README.md /usr/share/nginx/html/README.md |
| |
|
| | WORKDIR / |
| |
|
| | |
| | COPY --chmod=755 scripts |
| | |
| | |
| | |
| | |
| | |
| | |
| | |