| RUN cp /etc/apt/sources.list /etc/apt/sources.listBak && \ | |
| sed -i "s#http://archive.ubuntu.com/ubuntu/#https://mirrors.virtaicloud.com/repository/ubuntu/#g" /etc/apt/sources.list && \ | |
| sed -i "s#http://security.ubuntu.com/ubuntu/#https://mirrors.virtaicloud.com/repository/security/#g" /etc/apt/sources.list | |
| RUN apt-get update \ | |
| && apt-get install -y language-pack-zh-hans ibus-pinyin tree | |
| RUN pip install --upgrade pip \ | |
| && pip install --no-cache-dir pytest-base-url~=2.0 pytest-cov~=4.0 pytest~=7.3 | |
| RUN cd / && git clone https://githubfast.com/lllyasviel/stable-diffusion-webui-forge.git \ | |
| && cd stable-diffusion-webui-forge \ | |
| && pip install --no-cache-dir -r requirements_versions.txt \ | |
| && cd extensions \ | |
| && git clone https://githubfast.com/DominikDoom/a1111-sd-webui-tagcomplete.git \ | |
| && git clone https://githubfast.com/hanamizuki-ai/stable-diffusion-webui-localization-zh_Hans.git \ | |
| && git clone https://githubfast.com/wlxj1992/StyleSelectorXL.git \ | |
| && git clone https://githubfast.com/layerdiffusion/sd-forge-layerdiffuse.git \ | |
| && cd /stable-diffusion-webui-forge \ | |
| && mkdir repositories \ | |
| && cd repositories \ | |
| && git clone https://githubfast.com/Stability-AI/stablediffusion.git stable-diffusion-stability-ai \ | |
| && git clone https://githubfast.com/AUTOMATIC1111/stable-diffusion-webui-assets.git \ | |
| && git clone https://githubfast.com/Stability-AI/generative-models.git \ | |
| && git clone https://githubfast.com/salesforce/BLIP.git \ | |
| && git clone https://githubfast.com/crowsonkb/k-diffusion.git \ | |
| && git clone https://githubfast.com/pharmapsychotic/clip-interrogator | |
| RUN cd /stable-diffusion-webui-forge \ | |
| && git config --global url."https://githubfast.com/".insteadOf "https://github.com/" \ | |
| && git config protocol.https.allow always | |
| RUN mkdir -p /stable-diffusion-webui-forge/interrogate && cp /stable-diffusion-webui-forge/repositories/clip-interrogator/clip_interrogator/data/* /stable-diffusion-webui-forge/interrogate | |
| RUN pip install --no-cache-dir clip xformers==0.0.23.post1 | |
| RUN pip install --no-cache-dir python-dotenv chardet PyExecJS pathos openai aliyun-python-sdk-core aliyun-python-sdk-alimt insightface fvcore onnxruntime svglib | |
| RUN pip install --no-cache-dir https://gh.con.sh/https://github.com/huchenlei/HandRefinerPortable/releases/download/v1.0.1/handrefinerportable-2024.2.12.0-py2.py3-none-any.whl \ | |
| && pip install --no-cache-dir https://gh.con.sh/https://github.com/huchenlei/Depth-Anything/releases/download/v1.0.0/depth_anything-2024.1.22.0-py2.py3-none-any.whl | |
| RUN wget https://hf-mirror.com/datasets/xiaoguang123/MySDModels/resolve/main/frpc_linux_amd64_v0.2 && chmod +x frpc_linux_amd64_v0.2 &&\ | |
| mv frpc_linux_amd64_v0.2 /root/miniconda3/lib/python3.10/site-packages/gradio/ | |
| RUN cd / && wget https://hf-mirror.com/datasets/xiaoguang123/BuildDockerOn_virtaicloud/resolve/main/load_SD1.5_models.sh \ | |
| && wget https://hf-mirror.com/datasets/xiaoguang123/BuildDockerOn_virtaicloud/resolve/main/load_models_for_controlnet.sh \ | |
| && wget https://hf-mirror.com/datasets/xiaoguang123/BuildDockerOn_virtaicloud/resolve/main/replace_url.py \ | |
| && wget https://hf-mirror.com/datasets/xiaoguang123/BuildDockerOn_virtaicloud/resolve/main/run_webui.sh \ | |
| && mv run_webui.sh /stable-diffusion-webui-forge/ |