parent
8df9d10a58
commit
f1a1641add
@ -27,7 +27,7 @@ services:
|
|||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["auto"]
|
profiles: ["auto"]
|
||||||
build: ./services/AUTOMATIC1111
|
build: ./services/AUTOMATIC1111
|
||||||
image: sd-auto:18
|
image: sd-auto:19
|
||||||
environment:
|
environment:
|
||||||
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access
|
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ services:
|
|||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["hlky"]
|
profiles: ["hlky"]
|
||||||
build: ./services/hlky/
|
build: ./services/hlky/
|
||||||
image: sd-hlky:10
|
image: sd-hlky:11
|
||||||
environment:
|
environment:
|
||||||
- CLI_ARGS=--optimized-turbo
|
- CLI_ARGS=--optimized-turbo
|
||||||
- USE_STREAMLIT=0
|
- USE_STREAMLIT=0
|
||||||
@ -51,7 +51,7 @@ services:
|
|||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["lstein"]
|
profiles: ["lstein"]
|
||||||
build: ./services/lstein/
|
build: ./services/lstein/
|
||||||
image: sd-lstein:8
|
image: sd-lstein:9
|
||||||
environment:
|
environment:
|
||||||
- PRELOAD=true
|
- PRELOAD=true
|
||||||
- CLI_ARGS=--max_loaded_models=1
|
- CLI_ARGS=
|
||||||
|
@ -78,7 +78,7 @@ git reset --hard ${SHA}
|
|||||||
pip install -r requirements_versions.txt
|
pip install -r requirements_versions.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN pip install opencv-python-headless
|
RUN pip install opencv-python-headless transformers==4.24.0
|
||||||
|
|
||||||
COPY . /docker
|
COPY . /docker
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ conda env update --file environment.yaml -n base
|
|||||||
conda clean -a -y
|
conda clean -a -y
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
RUN pip install transformers==4.24.0
|
||||||
|
|
||||||
# add info
|
# add info
|
||||||
COPY . /docker/
|
COPY . /docker/
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM python:3.10-slim
|
FROM python:3.10-slim
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-ceuxo", "pipefail"]
|
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 PIP_NO_CACHE_DIR=1
|
||||||
|
|
||||||
|
|
||||||
RUN pip install torch==1.13.0 torchvision --extra-index-url https://download.pytorch.org/whl/cu117
|
RUN 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 apt-get update && apt-get install git -y && apt-get clean
|
||||||
|
|
||||||
@ -16,23 +15,34 @@ RUN git clone https://github.com/invoke-ai/InvokeAI.git /stable-diffusion
|
|||||||
WORKDIR /stable-diffusion
|
WORKDIR /stable-diffusion
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
git reset --hard 2b7e3abe57963d199f1d825ddef87ae154c81045
|
git reset --hard 5c31feb3a1096d437c94b6e1c3224eb7a7224a85
|
||||||
git config --global http.postBuffer 1048576000
|
git config --global http.postBuffer 1048576000
|
||||||
ln -sf environments-and-requirements/requirements-lin-cuda.txt requirements.txt
|
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
|
||||||
pip install -r requirements.txt
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
ARG BRANCH=development SHA=a9aa4e45aa6f5d5a2aa385349131d8733dd380fa
|
# patch match:
|
||||||
|
# https://github.com/invoke-ai/InvokeAI/blob/main/docs/installation/INSTALL_PATCHMATCH.md
|
||||||
|
RUN <<EOF
|
||||||
|
apt-get update
|
||||||
|
# apt-get install build-essential python3-opencv libopencv-dev -y
|
||||||
|
apt-get install make g++ libopencv-dev -y
|
||||||
|
apt-get clean
|
||||||
|
cd /usr/lib/x86_64-linux-gnu/pkgconfig/
|
||||||
|
ln -sf opencv4.pc opencv.pc
|
||||||
|
EOF
|
||||||
|
|
||||||
|
ARG BRANCH=main SHA=5c31feb3a1096d437c94b6e1c3224eb7a7224a85
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
git fetch
|
git fetch
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git checkout ${BRANCH}
|
git checkout ${BRANCH}
|
||||||
git reset --hard ${SHA}
|
git reset --hard ${SHA}
|
||||||
pip install -r requirements.txt
|
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
RUN pip install --force-reinstall opencv-python-headless==4.5.5.64
|
RUN pip install --force-reinstall opencv-python-headless && python3 -c "from patchmatch import patch_match"
|
||||||
|
|
||||||
|
|
||||||
COPY . /docker/
|
COPY . /docker/
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
@ -41,9 +51,9 @@ touch ~/.invokeai
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
ENV ROOT=/stable-diffusion PRELOAD=false CLI_ARGS=""
|
ENV ROOT=/stable-diffusion PYTHONPATH="${PYTHONPATH}:${ROOT}" PRELOAD=false CLI_ARGS=""
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||||
CMD python3 -u scripts/invoke.py --web --host 0.0.0.0 --port 7860 --config /docker/models.yaml --root_dir . --outdir /output ${CLI_ARGS}
|
CMD python3 -u scripts/invoke.py --web --host 0.0.0.0 --port 7860 --config /docker/models.yaml --root_dir ${ROOT} --outdir /output ${CLI_ARGS}
|
||||||
|
@ -21,10 +21,8 @@ MOUNTS["${ROOT}/models/CompVis/stable-diffusion-safety-checker"]=/data/.cache/hu
|
|||||||
|
|
||||||
|
|
||||||
# hacks
|
# hacks
|
||||||
MOUNTS["/opt/conda/lib/python3.10/site-packages/facexlib/weights"]=/data/.cache/
|
|
||||||
MOUNTS["${ROOT}/models/clipseg"]=/data/.cache/invoke/clipseg/
|
MOUNTS["${ROOT}/models/clipseg"]=/data/.cache/invoke/clipseg/
|
||||||
|
|
||||||
|
|
||||||
for to_path in "${!MOUNTS[@]}"; do
|
for to_path in "${!MOUNTS[@]}"; do
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
from_path="${MOUNTS[${to_path}]}"
|
from_path="${MOUNTS[${to_path}]}"
|
||||||
@ -40,7 +38,8 @@ for to_path in "${!MOUNTS[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if "${PRELOAD}" == "true"; then
|
if "${PRELOAD}" == "true"; then
|
||||||
python3 -u scripts/preload_models.py --no-interactive --root . --config_file /docker/models.yaml
|
set -Eeuo pipefail
|
||||||
|
python3 -u scripts/preload_models.py --no-interactive --root ${ROOT} --config_file /docker/models.yaml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user