Skip to content

Commit

Permalink
moved install requirements back into dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
cyntachs committed Jun 26, 2024
1 parent 48c8197 commit 179c1bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.title="Comfy-WebUI-Docker"
LABEL org.opencontainers.image.author="Cyntachs"
LABEL org.opencontainers.image.ref.name="ubuntu"
LABEL org.opencontainers.image.version="pytorch2.3.1-cuda12.1"
#LABEL com.nvidia.volumes.needed="nvidia_driver"
LABEL com.nvidia.volumes.needed="nvidia_driver"

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ="America/New_York"
Expand All @@ -15,11 +15,10 @@ COPY . /workspace/
RUN --mount=type=cache,target=/var/cache/apt,rw --mount=type=cache,target=/var/lib/apt,rw --mount=type=cache,target=/root/.cache/pip set -eux; \
apt-get update; \
apt-get install --no-install-recommends -y git python3 python3-pip; \
# apt-get install --no-install-recommends -y tzdata; \
# apt-get install --no-install-recommends -y libgl1 python3-opencv; \
pip3 install tzdata opencv-python glcontext; \
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121; \
pip3 install xformers opencv-python-headless; \
pip3 install -r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt; \
mkdir /stable-diffusion; \
chmod +x /workspace/entrypoint.sh; \
git config --global --add safe.directory /stable-diffusion; \
Expand Down
6 changes: 1 addition & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ if [ ! -f "/stable-diffusion/.installed" ]; then
echo "Installing ComfyUI..."
git clone https://github.com/comfyanonymous/ComfyUI.git /stable-diffusion
cd /stable-diffusion
#pip3 install -r requirements.txt

cd /stable-diffusion/custom_nodes

Expand All @@ -22,15 +21,12 @@ elif [ ! -f "/stable-diffusion/custom_nodes/ComfyUI-Manager/__init__.py" ]; then

git fetch https://github.com/comfyanonymous/ComfyUI.git
git pull
#pip3 install -r requirements.txt
pip3 install -r requirements.txt
fi;

echo "Set permissions..."
chown -R user:user /stable-diffusion

cd /stable-diffusion
echo "PIP Install Requirements..."
pip3 install -r requirements.txt

echo "Starting ComfyUI..."
python3 -u main.py --listen --port 5555 ${CLI_ARGS}

0 comments on commit 179c1bd

Please sign in to comment.