mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-03-13 00:33:57 +01:00
revamp
This commit is contained in:
parent
85645ae66c
commit
c2a700fa51
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -4,3 +4,7 @@
|
||||||
# VSCode specific
|
# VSCode specific
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
/.vscode
|
/.vscode
|
||||||
|
|
||||||
|
# Service data
|
||||||
|
/data/*
|
||||||
|
!/data/.gitkeep
|
||||||
4
data/.gitignore
vendored
4
data/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
/.cache
|
|
||||||
/config
|
|
||||||
/embeddings
|
|
||||||
/models
|
|
||||||
0
data/.gitkeep
Normal file
0
data/.gitkeep
Normal file
|
|
@ -7,13 +7,16 @@ ENV NVIDIA_VISIBLE_DEVICES=all
|
||||||
ENV PYTHONPATH="${PYTHONPATH}:${PWD}"
|
ENV PYTHONPATH="${PYTHONPATH}:${PWD}"
|
||||||
ENV CLI_ARGS=""
|
ENV CLI_ARGS=""
|
||||||
|
|
||||||
|
WORKDIR ${APPLICATION_ROOT}
|
||||||
|
|
||||||
|
# Explore how we can use the CLI to do this instead
|
||||||
|
# https://docs.comfy.org/installation/system_requirements
|
||||||
|
# https://docs.comfy.org/comfy-cli/getting-started
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y git && \
|
apt-get install -y git && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
git clone --branch v0.3.19 --depth 1 https://github.com/comfyanonymous/ComfyUI.git ${APPLICATION_ROOT}
|
git clone --branch v0.3.19 --depth 1 https://github.com/comfyanonymous/ComfyUI.git ${APPLICATION_ROOT}
|
||||||
|
|
||||||
WORKDIR ${APPLICATION_ROOT}
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,21 @@
|
||||||
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
mkdir -vp /data/config/comfy/custom_nodes
|
BASE_DIRECTORY="/data/config/comfy"
|
||||||
|
OUTPUT_DIRECTORY="/data/output"
|
||||||
|
|
||||||
declare -A MOUNTS
|
mkdir -vp ${BASE_DIRECTORY}
|
||||||
|
mkdir -vp ${BASE_DIRECTORY}/temp
|
||||||
|
mkdir -vp ${BASE_DIRECTORY}/user
|
||||||
|
mkdir -vp ${BASE_DIRECTORY}/custom_nodes
|
||||||
|
mkdir -vp ${OUTPUT_DIRECTORY}
|
||||||
|
|
||||||
# MOUNTS["/root/.cache"]="/data/.cache" # Determine why the original author decided to do this.
|
# --base-directory BASE_DIRECTORY
|
||||||
MOUNTS["${APPLICATION_ROOT}/input"]="/data/config/comfy/input"
|
# Set the ComfyUI base directory for models,
|
||||||
MOUNTS["${APPLICATION_ROOT}/output"]="/output/comfy"
|
# custom_nodes, input, output, temp, and user directories.
|
||||||
|
CLI_ARGS+="${CLI_ARGS} --base-directory ${BASE_DIRECTORY} --output-directory ${OUTPUT_DIRECTORY}"
|
||||||
|
|
||||||
for to_path in "${!MOUNTS[@]}"; do
|
echo ${CLI_ARGS}
|
||||||
set -Eeuo pipefail
|
|
||||||
from_path="${MOUNTS[${to_path}]}"
|
|
||||||
rm -rf "${to_path}"
|
|
||||||
if [ ! -f "$from_path" ]; then
|
|
||||||
mkdir -vp "$from_path"
|
|
||||||
fi
|
|
||||||
mkdir -vp "$(dirname "${to_path}")"
|
|
||||||
ln -sT "${from_path}" "${to_path}"
|
|
||||||
echo Mounted $(basename "${from_path}")
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -f "/data/config/comfy/startup.sh" ]; then
|
if [ -f "/data/config/comfy/startup.sh" ]; then
|
||||||
pushd ${APPLICATION_ROOT}
|
pushd ${APPLICATION_ROOT}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example
|
||||||
a111:
|
a111:
|
||||||
base_path: /data
|
base_path: /data
|
||||||
|
|
||||||
|
|
@ -16,8 +17,10 @@ a111:
|
||||||
clip: models/CLIPEncoder
|
clip: models/CLIPEncoder
|
||||||
embeddings: embeddings
|
embeddings: embeddings
|
||||||
|
|
||||||
# This isn't a real value as far as I can tell?
|
comfyui:
|
||||||
custom_nodes: config/comfy/custom_nodes
|
base_path: /data
|
||||||
|
|
||||||
|
# custom_nodes: config/comfy/custom_nodes
|
||||||
|
|
||||||
# TODO: I am unsure about these, need more testing
|
# TODO: I am unsure about these, need more testing
|
||||||
# style_models: data/config/comfy/style_models
|
# style_models: data/config/comfy/style_models
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue