add chillout template docker

This commit is contained in:
hl 2023-02-28 00:13:15 -08:00
parent 31ba11e068
commit 9c11e2fc02
7 changed files with 119 additions and 3 deletions

View File

@ -0,0 +1,21 @@
FROM runpod/stable-diffusion:web-automatic-1.5.16
SHELL ["/bin/bash", "-c"]
ENV PATH="${PATH}:/workspace/stable-diffusion-webui/venv/bin"
WORKDIR /
RUN rm /workspace/v1-5-pruned-emaonly.ckpt
ADD ./models/checkpoint/chilloutmix.safetensors /workspace/stable-diffusion-webui/models/Stable-diffusion/chilloutmix.safetensors
ADD ./models/Lora/ /workspace/stable-diffusion-webui/models/Lora/
ADD relauncher.py .
ADD webui-user.sh .
ADD start.sh /start.sh
RUN chmod a+x /start.sh
SHELL ["/bin/bash", "--login", "-c"]
CMD [ "/start.sh" ]

1
chilloutmix-template/build.sh Executable file
View File

@ -0,0 +1 @@
DOCKER_BUILDKIT=1 docker build -t chilloutai/chilloutmix-template:1.2.0 .

View File

@ -0,0 +1,6 @@
wget -O koreanDollLikeness_v15.safetensors https://civitai.com/api/download/models/14014
wget -O japaneseDollLikeness_v10.safetensors https://civitai.com/api/download/models/12050
wget -O taiwanDollLikeness_v10.safetensors https://civitai.com/api/download/models/9070
wget -O yaemikoMixed.safetensors https://civitai.com/api/download/models/11523
wget -O russianDollLikeness_v3.safetensors https://civitai.com/api/download/models/15396
wget -O koreanDollLikeness_v10.safetensors https://civitai.com/api/download/models/8750

View File

@ -0,0 +1,12 @@
import os, time
n = 0
while True:
print('Relauncher: Launching...')
if n > 0:
print(f'\tRelaunch count: {n}')
launch_string = "/workspace/stable-diffusion-webui/webui.sh -f"
os.system(launch_string)
print('Relauncher: Process is ending. Relaunching in 2s...')
n += 1
time.sleep(2)

View File

@ -0,0 +1,32 @@
#!/bin/bash
echo "Container Started"
export PYTHONUNBUFFERED=1
source /workspace/stable-diffusion-webui/venv/bin/activate
cd /workspace/stable-diffusion-webui
python relauncher.py &
if [[ $PUBLIC_KEY ]]
then
mkdir -p ~/.ssh
chmod 700 ~/.ssh
cd ~/.ssh
echo $PUBLIC_KEY >> authorized_keys
chmod 700 -R ~/.ssh
cd /
service ssh start
echo "SSH Service Started"
fi
if [[ $JUPYTER_PASSWORD ]]
then
ln -sf /examples /workspace
ln -sf /root/welcome.ipynb /workspace
cd /
jupyter lab --allow-root --no-browser --port=8888 --ip=* \
--ServerApp.terminado_settings='{"shell_command":["/bin/bash"]}' \
--ServerApp.token=$JUPYTER_PASSWORD --ServerApp.allow_origin=* --ServerApp.preferred_dir=/workspace
echo "Jupyter Lab Started"
fi
sleep infinity

View File

@ -0,0 +1,47 @@
# #!/bin/bash
#########################################################
# Uncomment and change the variables below to your need:#
#########################################################
# Install directory without trailing slash
install_dir="/workspace"
# Name of the subdirectory
#clone_dir="stable-diffusion-webui"
# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
export COMMANDLINE_ARGS="--port 3000 --xformers --ckpt /workspace/chilloutmix.safetensors --listen --enable-insecure-extension-access"
# python3 executable
#python_cmd="python3"
# git executable
#export GIT="git"
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
# venv_dir="/workspace/venv"
# script to launch to start the app
# export LAUNCH_SCRIPT="dummy.py"
# install command for torch
#export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
# Requirements file to use for stable-diffusion-webui
#export REQS_FILE="requirements_versions.txt"
# Fixed git repos
#export K_DIFFUSION_PACKAGE=""
#export GFPGAN_PACKAGE=""
# Fixed git commits
#export STABLE_DIFFUSION_COMMIT_HASH=""
#export TAMING_TRANSFORMERS_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
###########################################

View File

@ -1,3 +0,0 @@
wget -O koreanDollLikeness_v15.safetensors https://civitai.com/api/download/models/14014
wget -O japaneseDollLikeness_v10.safetensors https://civitai.com/api/download/models/12050
wget -O taiwanDollLikeness_v10.safetensors https://civitai.com/api/download/models/9070