|
|
|
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime |
|
|
|
ENV TZ=Europe/Minsk |
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y \ |
|
git \ |
|
wget \ |
|
libgl1-mesa-glx \ |
|
libglvnd0 \ |
|
libglib2.0-0 \ |
|
libsm6 \ |
|
libxrender1 \ |
|
libxext6 \ |
|
xvfb \ |
|
build-essential \ |
|
cmake \ |
|
libgoogle-perftools-dev \ |
|
&& apt-get clean |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade pip |
|
|
|
|
|
RUN pip install xformers |
|
RUN pip install gdown |
|
|
|
|
|
RUN git clone https://github.com/lllyasviel/stable-diffusion-webui-forge |
|
|
|
|
|
WORKDIR $HOME/stable-diffusion-webui-forge/ |
|
|
|
|
|
RUN git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git extensions/stable-diffusion-webui-images-browser |
|
RUN git clone https://github.com/camenduru/stable-diffusion-webui-huggingface.git extensions/stable-diffusion-webui-huggingface |
|
RUN git clone https://github.com/BlafKing/sd-civitai-browser-plus.git extensions/civitai-browser |
|
RUN git clone https://github.com/zanllp/sd-webui-infinite-image-browsing.git extensions/sd-webui-infinite-image-browsing |
|
|
|
|
|
RUN mkdir -p models/Lora \ |
|
models/Stable-diffusion \ |
|
models/ControlNet |
|
|
|
WORKDIR $HOME/stable-diffusion-webui-forge |
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD bash webui.sh -f --port 7860 --listen --cuda-malloc --cuda-stream --pin-shared-memory --enable-insecure-extension-access |