Commit 0c0b3533 authored by nanahira's avatar nanahira

Update Dockerfile, .gitlab-ci.yml, requirements.txt files

Deleted Dockerfile.xformers
parent 3c2d3619
Pipeline #40421 canceled with stage
in 6 minutes and 20 seconds
...@@ -21,33 +21,6 @@ build-base: ...@@ -21,33 +21,6 @@ build-base:
variables: variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
.build-xformers:
extends: .build-image
stage: build2
script:
- docker build --pull --build-arg BASE=$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG --build-arg=GRAPHIC_VERSION=$GRAPHIC_VERSION -f Dockerfile.xformers -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xformers-$GRAPHIC_VERSION .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xformers-$GRAPHIC_VERSION
build-xformers-7.5:
extends: .build-xformers
variables:
GRAPHIC_VERSION: '7.5' # Quadro or 20xx
build-xformers-8.6:
extends: .build-xformers
variables:
GRAPHIC_VERSION: '8.6' # 30xx or A4000 A5000
build-xformers-8.9:
extends: .build-xformers
variables:
GRAPHIC_VERSION: '8.9' # 40xx
build-xformers-6.1:
extends: .build-xformers
variables:
GRAPHIC_VERSION: '6.1' # 10xx
.deploy: .deploy:
stage: deploy stage: deploy
tags: tags:
...@@ -63,35 +36,3 @@ deploy_latest: ...@@ -63,35 +36,3 @@ deploy_latest:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest
only: only:
- master - master
.deploy-xformers:
extends: .deploy
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest
only:
- master
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xformers-$GRAPHIC_VERSION
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-xformers-$GRAPHIC_VERSION $CI_REGISTRY_IMAGE:xformers-$GRAPHIC_VERSION
- docker push $CI_REGISTRY_IMAGE:xformers-$GRAPHIC_VERSION
deploy-xformers-7.5:
extends: .deploy-xformers
variables:
GRAPHIC_VERSION: '7.5'
deploy-xformers-8.6:
extends: .deploy-xformers
variables:
GRAPHIC_VERSION: '8.6'
deploy-xformers-6.1:
extends: .deploy-xformers
variables:
GRAPHIC_VERSION: '6.1'
deploy-xformers-8.9:
extends: .deploy-xformers
variables:
GRAPHIC_VERSION: '8.9'
...@@ -38,7 +38,7 @@ COPY --chown=sd ./requirements.txt ./requirements.txt ...@@ -38,7 +38,7 @@ COPY --chown=sd ./requirements.txt ./requirements.txt
RUN pip install --no-cache-dir \ RUN pip install --no-cache-dir \
# torch # torch
torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121 \ torch==2.1.2 torchvision==0.16.2 xformers==v0.0.23.post1 --extra-index-url https://download.pytorch.org/whl/cu121 \
# requirements for the project # requirements for the project
-r requirements.txt \ -r requirements.txt \
# (optional) install requirements for CodeFormer (face restoration) # (optional) install requirements for CodeFormer (face restoration)
...@@ -58,4 +58,4 @@ COPY --chown=sd . ./ ...@@ -58,4 +58,4 @@ COPY --chown=sd . ./
ENV LD_PRELOAD libtcmalloc.so ENV LD_PRELOAD libtcmalloc.so
ENTRYPOINT ["python3", "webui.py"] ENTRYPOINT ["python3", "webui.py"]
CMD ["--listen", "--port", "8080"] CMD ["--listen", "--port", "8080", "--xformers"]
ARG BASE
FROM ${BASE}
ARG GRAPHIC_VERSION
RUN env FORCE_CUDA=1 CUDA_VISIBLE_DEVICES=0 TORCH_CUDA_ARCH_LIST=${GRAPHIC_VERSION} \
pip install --no-cache-dir git+https://github.com/facebookresearch/xformers.git@v0.0.23.post1#egg=xformers
CMD ["--listen", "--port", "8080", "--xformers"]
...@@ -62,3 +62,7 @@ git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeeb ...@@ -62,3 +62,7 @@ git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeeb
# install deepdanbooru # install deepdanbooru
git+https://github.com/KichangKim/DeepDanbooru.git@05eb3c39b0fae43e3caf39df801615fe79b27c2f#egg=deepdanbooru[tensorflow] git+https://github.com/KichangKim/DeepDanbooru.git@05eb3c39b0fae43e3caf39df801615fe79b27c2f#egg=deepdanbooru[tensorflow]
# deps searched for a long time
tb_nightly==2.12.0a20230126
onnx==1.12.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment