Skip to content

Commit

Permalink
Update Versions (AbdBarho#256)
Browse files Browse the repository at this point in the history
sygil:
Sygil-Dev/sygil-webui@5291437
Also, switch to pip instead of conda because it is really slow

invoke:
invoke-ai/InvokeAI@ed9186b
  • Loading branch information
AbdBarho committed Dec 9, 2022
1 parent 87a51e9 commit 1423b27
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ services:
<<: *base_service
profiles: ["sygil"]
build: ./services/sygil/
image: sd-sygil:12
image: sd-sygil:13
environment:
- CLI_ARGS=--optimized-turbo
- USE_STREAMLIT=0

sygil-sl:
<<: *sygil
profiles: ["sygil-sl"]
environment:
- USE_STREAMLIT=1

Expand All @@ -57,7 +58,7 @@ services:
<<: *base_service
profiles: ["invoke"]
build: ./services/invoke/
image: sd-invoke:10
image: sd-invoke:11
environment:
- PRELOAD=true
- CLI_ARGS=
14 changes: 8 additions & 6 deletions services/invoke/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
FROM python:3.10-slim
SHELL ["/bin/bash", "-ceuxo", "pipefail"]

ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1
ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1


RUN pip install torch==1.12.0+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
RUN --mount=type=cache,target=/root/.cache/pip \
pip install torch==1.12.0+cu116 --extra-index-url https://download.pytorch.org/whl/cu116

RUN apt-get update && apt-get install git -y && apt-get clean

RUN git clone https://github.com/invoke-ai/InvokeAI.git /stable-diffusion

WORKDIR /stable-diffusion

RUN <<EOF
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
git reset --hard 5c31feb3a1096d437c94b6e1c3224eb7a7224a85
git config --global http.postBuffer 1048576000
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
Expand All @@ -32,16 +33,17 @@ cd /usr/lib/x86_64-linux-gnu/pkgconfig/
ln -sf opencv4.pc opencv.pc
EOF

ARG BRANCH=main SHA=38cd968130e386d188bdef68f9fbfbbbfabb2da0
RUN <<EOF
ARG BRANCH=main SHA=ed9186b09950f2652a0b07c93a08490f475435f7
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
git fetch
git reset --hard
git checkout ${BRANCH}
git reset --hard ${SHA}
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
EOF

RUN pip install --force-reinstall opencv-python-headless && python3 -c "from patchmatch import patch_match"
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --force-reinstall opencv-python-headless && python3 -c "from patchmatch import patch_match"


COPY . /docker/
Expand Down
29 changes: 11 additions & 18 deletions services/sygil/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
# syntax=docker/dockerfile:1

FROM continuumio/miniconda3:4.12.0
FROM python:3.8-slim

SHELL ["/bin/bash", "-ceuxo", "pipefail"]

ENV DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1

RUN conda install python=3.8.5 && conda clean -a -y
RUN conda install pytorch==1.11.0 torchvision==0.12.0 cudatoolkit=11.3 -c pytorch && conda clean -a -y
RUN --mount=type=cache,target=/root/.cache/pip pip install torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117

RUN apt-get update && apt install fonts-dejavu-core rsync gcc -y && apt-get clean
RUN apt-get update && apt install gcc libsndfile1 ffmpeg build-essential zip unzip git -y && apt-get clean


ENV PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1

RUN <<EOF
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
git config --global http.postBuffer 1048576000
git clone https://github.com/Sygil-Dev/sygil-webui.git stable-diffusion
cd stable-diffusion
git reset --hard 091520bed06f913c9f432f9f47ccbe22b46068d7
conda env update --file environment.yaml -n base
conda clean -a -y
git reset --hard 5291437085bddd16d752f811b6552419a2044d12
pip install -r requirements.txt
EOF

RUN apt-get update && apt install libsndfile1 ffmpeg -y && apt-get clean

ARG BRANCH=dev SHA=18a3b809275c395b9a2730c78d6bc0f9b06671e1
RUN <<EOF
ARG BRANCH=master SHA=5291437085bddd16d752f811b6552419a2044d12
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
cd stable-diffusion
git fetch
git checkout ${BRANCH}
git reset --hard ${SHA}
conda env update --file environment.yaml -n base
conda clean -a -y
pip install -r requirements.txt
EOF

RUN pip install transformers==4.24.0
RUN --mount=type=cache,target=/root/.cache/pip pip install transformers==4.24.0

# add info
COPY . /docker/
Expand Down

0 comments on commit 1423b27

Please sign in to comment.