Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
7189aa9a
Commit
7189aa9a
authored
Nov 04, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add xformers build
parent
65186593
Pipeline
#17734
failed
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
10 deletions
+67
-10
.dockerignore
.dockerignore
+1
-1
.gitlab-ci.yml
.gitlab-ci.yml
+53
-4
Dockerfile
Dockerfile
+5
-5
Dockerfile.xformers
Dockerfile.xformers
+8
-0
No files found.
.dockerignore
View file @
7189aa9a
.git*
Dockerfile
Dockerfile
*
.dockerignore
/test
...
...
.gitlab-ci.yml
View file @
7189aa9a
stages
:
-
build
-
build2
-
deploy
variables
:
GIT_DEPTH
:
"
1"
...
...
@@ -9,17 +10,39 @@ before_script:
.build-image
:
stage
:
build
tags
:
-
docker
script
:
-
docker build --pull -t $TARGET_IMAGE .
-
docker push $TARGET_IMAGE
build-
x86
:
build-
base
:
extends
:
.build-image
tags
:
-
docker
variables
:
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
build-xformers-8.6
:
extends
:
.build-xformers
variables
:
GRAPHIC_VERSION
:
8.6
build-xformers-6.1
:
extends
:
.build-xformers
variables
:
GRAPHIC_VERSION
:
6.1
.deploy
:
stage
:
deploy
tags
:
...
...
@@ -27,7 +50,7 @@ build-x86:
script
:
-
docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
-
docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $TARGET_IMAGE
-
docker
push $TARGET_IMAGE
-
docker push $TARGET_IMAGE
deploy_latest
:
extends
:
.deploy
...
...
@@ -35,3 +58,29 @@ deploy_latest:
TARGET_IMAGE
:
$CI_REGISTRY_IMAGE:latest
only
:
-
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
Dockerfile
View file @
7189aa9a
...
...
@@ -8,7 +8,7 @@ RUN apt update \
RUN
useradd
-ms
/bin/bash sd
USER
sd
RUN
pip
install
torch
==
1.12.1+cu113
torchvision
==
0.13.1+cu113
--extra-index-url
https://download.pytorch.org/whl/cu113
RUN
pip
install
--no-cache-dir
torch
==
1.12.1+cu113
torchvision
==
0.13.1+cu113
--extra-index-url
https://download.pytorch.org/whl/cu113
RUN
mkdir
/home/sd/stable-diffusion-webui
WORKDIR
/home/sd/stable-diffusion-webui
...
...
@@ -39,9 +39,9 @@ RUN mkdir repositories && \
pip install -r repositories/latent-diffusion/requirements.txt --prefer-binary && \
# update numpy to latest version
pip install -U numpy --prefer-binary && \
pip install -
-no-cache-dir -
U numpy --prefer-binary && \
pip install \
pip install
--no-cache-dir
\
# install requirements of Stable Diffusion
transformers==4.19.2 diffusers invisible-watermark triton \
...
...
@@ -56,7 +56,7 @@ RUN mkdir repositories && \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
# install xformers
git+https://github.com/facebookresearch/xformers.git@v0.0.13
#egg=xformers \
#
git+https://github.com/facebookresearch/xformers.git@v0.0.13#egg=xformers \
# install deepdanbooru
git+https://github.com/KichangKim/DeepDanbooru.git@d91a2963bf87c6a770d74894667e9ffa9f6de7ff
#egg=deepdanbooru[tensorflow] tensorflow==2.10.0 tensorflow-io==0.27.0 \
...
...
@@ -68,7 +68,7 @@ RUN mkdir repositories && \
pip install -r repositories/CodeFormer/requirements.txt --prefer-binary
COPY
--chown=sd ./requirements.txt ./requirements.txt
RUN
pip
install
-r
requirements.txt
--prefer-binary
RUN
pip
install
-
-no-cache-dir
-
r
requirements.txt
--prefer-binary
COPY
--chown=sd . ./
# Plugins
...
...
Dockerfile.xformers
0 → 100644
View file @
7189aa9a
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.13#egg=xformers
CMD ["--listen", "--port", "8080", "--xformers"]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment