mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-29 21:13:33 +08:00
Fix nitpicked issues
This commit is contained in:
parent
dd97e75d44
commit
267e576007
@ -1,6 +1,7 @@
|
|||||||
# This file should remain in sync with .gitignore. If you need to make changes,
|
# This file should remain in sync with .gitignore. If you need to make changes,
|
||||||
# please add a comment explaining why. For items that must be removed, comment
|
# please add a comment explaining why. For items that must be removed, comment
|
||||||
# them out instead of deleting them.
|
# them out instead of deleting them.
|
||||||
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
/output/
|
/output/
|
||||||
@ -16,7 +17,7 @@ extra_model_paths.yaml
|
|||||||
/.vs
|
/.vs
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
venv/
|
venv*/
|
||||||
.venv/
|
.venv/
|
||||||
/web/extensions/*
|
/web/extensions/*
|
||||||
!/web/extensions/logging.js.example
|
!/web/extensions/logging.js.example
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@ -11,7 +11,9 @@
|
|||||||
# supported at a time.
|
# supported at a time.
|
||||||
FROM python:3.12.12-trixie
|
FROM python:3.12.12-trixie
|
||||||
|
|
||||||
# Install cmake, which is an indirect installation dependencies
|
# Install cmake, which is an indirect installation dependencies. We also keep
|
||||||
|
# the apt cache following the update so the image can be quickly rebuilt with
|
||||||
|
# additional, user-defined system dependencies required by custom node packs.
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends cmake
|
RUN apt-get update && apt-get install -y --no-install-recommends cmake
|
||||||
|
|
||||||
# Create a regular user whose UID and GID will match the host user's at runtime.
|
# Create a regular user whose UID and GID will match the host user's at runtime.
|
||||||
@ -53,7 +55,7 @@ ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
|
|||||||
#
|
#
|
||||||
# Since this step takes a long time to complete, it's performed early to take
|
# Since this step takes a long time to complete, it's performed early to take
|
||||||
# advantage of Docker's build cache, thereby accelerating subsequent builds.
|
# advantage of Docker's build cache, thereby accelerating subsequent builds.
|
||||||
COPY requirements.txt manager_requirements.txt ./
|
COPY requirements.txt ./
|
||||||
RUN pip install \
|
RUN pip install \
|
||||||
--no-cache-dir \
|
--no-cache-dir \
|
||||||
--disable-pip-version-check \
|
--disable-pip-version-check \
|
||||||
@ -80,7 +82,8 @@ VOLUME /comfyui/user
|
|||||||
VOLUME /home/comfyui
|
VOLUME /home/comfyui
|
||||||
|
|
||||||
# Switch back to root to run the entrypoint and to install additional system
|
# Switch back to root to run the entrypoint and to install additional system
|
||||||
# dependencies
|
# dependencies. The entrypoint will drop privileges and run the application as
|
||||||
|
# the comfyui user after performing initial setup.
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# Configure entrypoint
|
# Configure entrypoint
|
||||||
@ -88,7 +91,8 @@ RUN chmod +x entrypoint.sh
|
|||||||
ENTRYPOINT [ "./entrypoint.sh" ]
|
ENTRYPOINT [ "./entrypoint.sh" ]
|
||||||
CMD [ "python", "./main.py" ]
|
CMD [ "python", "./main.py" ]
|
||||||
|
|
||||||
# Install additional system dependencies
|
# Install additional system dependencies. Users can use this to install
|
||||||
|
# dependencies required by custom node packs.
|
||||||
ARG APT_EXTRA_PACKAGES
|
ARG APT_EXTRA_PACKAGES
|
||||||
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
|
RUN apt-get install -y --no-install-recommends $APT_EXTRA_PACKAGES \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
|
|||||||
@ -39,6 +39,7 @@ chown -R "$user:$user_group" \
|
|||||||
# address this issue.
|
# address this issue.
|
||||||
echo "[entrypoint] Adding user to GPU device groups..."
|
echo "[entrypoint] Adding user to GPU device groups..."
|
||||||
for dev in /dev/nvidia*; do
|
for dev in /dev/nvidia*; do
|
||||||
|
[ -e "$dev" ] || continue
|
||||||
group=$(ls -ld "$dev" | awk '{print $4}')
|
group=$(ls -ld "$dev" | awk '{print $4}')
|
||||||
usermod -aG "$group" "$user"
|
usermod -aG "$group" "$user"
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user