mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-01-24 01:10:23 +01:00
working
This commit is contained in:
parent
73b2e33326
commit
85645ae66c
|
|
@ -1,28 +1,26 @@
|
|||
FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV PIP_PREFER_BINARY=1
|
||||
ENV APPLICATION_ROOT=/stable-diffusion
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||
ENV PYTHONPATH="${PYTHONPATH}:${PWD}"
|
||||
ENV CLI_ARGS=""
|
||||
|
||||
RUN apt-get update && apt-get install -y git && apt-get clean
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git && \
|
||||
apt-get clean && \
|
||||
git clone --branch v0.3.19 --depth 1 https://github.com/comfyanonymous/ComfyUI.git ${APPLICATION_ROOT}
|
||||
|
||||
# Set USER here? https://stackoverflow.com/questions/24549746/switching-users-inside-docker-image-to-a-non-root-user
|
||||
# USER ${uid}:${gid}
|
||||
WORKDIR ${APPLICATION_ROOT}
|
||||
|
||||
# RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
# put Cache somehwere else or don't define target?
|
||||
# PIP_CACHE_DIR pip cache dir
|
||||
COPY . .
|
||||
|
||||
ENV ROOT=/stable-diffusion
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \
|
||||
cd ${ROOT} && \
|
||||
git checkout v0.3.19 && \
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements.txt && \
|
||||
chmod u+x ./entrypoint.sh
|
||||
|
||||
WORKDIR ${ROOT}
|
||||
COPY . /docker/
|
||||
RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml ${ROOT}
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
|
||||
EXPOSE 7860
|
||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||
CMD python -u main.py --listen --port 7860 ${CLI_ARGS}
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
CMD python -u main.py --listen --port 7860 ${CLI_ARGS}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ mkdir -vp /data/config/comfy/custom_nodes
|
|||
|
||||
declare -A MOUNTS
|
||||
|
||||
MOUNTS["/root/.cache"]="/data/.cache"
|
||||
MOUNTS["${ROOT}/input"]="/data/config/comfy/input"
|
||||
MOUNTS["${ROOT}/output"]="/output/comfy"
|
||||
# MOUNTS["/root/.cache"]="/data/.cache" # Determine why the original author decided to do this.
|
||||
MOUNTS["${APPLICATION_ROOT}/input"]="/data/config/comfy/input"
|
||||
MOUNTS["${APPLICATION_ROOT}/output"]="/output/comfy"
|
||||
|
||||
for to_path in "${!MOUNTS[@]}"; do
|
||||
set -Eeuo pipefail
|
||||
|
|
@ -23,7 +23,7 @@ for to_path in "${!MOUNTS[@]}"; do
|
|||
done
|
||||
|
||||
if [ -f "/data/config/comfy/startup.sh" ]; then
|
||||
pushd ${ROOT}
|
||||
pushd ${APPLICATION_ROOT}
|
||||
. /data/config/comfy/startup.sh
|
||||
popd
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ a111:
|
|||
clip: models/CLIPEncoder
|
||||
embeddings: embeddings
|
||||
|
||||
# This isn't a real value as far as I can tell?
|
||||
custom_nodes: config/comfy/custom_nodes
|
||||
|
||||
# TODO: I am unsure about these, need more testing
|
||||
|
|
|
|||
Loading…
Reference in a new issue