domcker-h-laude-bsdk / Dockerfile
camenduru's picture
Update Dockerfile
69987cf
raw
history blame
3.47 kB
# Dockerfile Private A10G
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND noninteractive
WORKDIR /content
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && pip3 install --upgrade pip
RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
RUN pip install --pre triton
RUN pip install numexpr
RUN git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui && cd stable-diffusion-webui && sed -i -e 's/ start()/ #start()/g' launch.py && python launch.py --skip-torch-cuda-test
# ----------------------------Delete this block if you don't want to see the extra header----------------------------
ADD https://github.com/camenduru/webui-docker/raw/main/env_patch.py /content/env_patch.py
RUN sed -i -e '/import image_from_url_text/r /content/env_patch.py' /content/stable-diffusion-webui/modules/ui.py
ADD https://github.com/camenduru/webui-docker/raw/main/header_patch.py /content/header_patch.py
RUN sed -i -e '/demo:/r /content/header_patch.py' /content/stable-diffusion-webui/modules/ui.py
# -------------------------------------------------------------------------------------------------------------------
ADD https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py /content/stable-diffusion-webui/scripts/run_n_times.py
RUN git clone https://github.com/camenduru/deforum-for-automatic1111-webui /content/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui
RUN git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser
RUN git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /content/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface
RUN git clone https://github.com/Vetchems/sd-civitai-browser /content/stable-diffusion-webui/extensions/sd-civitai-browser
RUN git clone https://github.com/camenduru/stable-diffusion-webui-artists-to-study /content/stable-diffusion-webui/extensions/stable-diffusion-webui-artists-to-study
COPY config.json /content/config.json
COPY ui-config.json /content/ui-config.json
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.ckpt
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.vae.pt
ADD https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt /content/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.ckpt
ADD https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt /content/stable-diffusion-webui/embeddings/bad_prompt_version2.pt
RUN adduser --disabled-password --gecos '' user
RUN chown -R user:user /content
RUN chmod -R 777 /content
USER user
EXPOSE 7860
CMD cd /content/stable-diffusion-webui && python webui.py --xformers --listen --disable-console-progressbars --no-progressbar-hiding --ui-config-file /content/ui-config.json --ui-settings-file /content/config.json