mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-29 21:13:33 +08:00
Allow giving custom --extra-index-url, defaults to CU130
This commit is contained in:
parent
eb85e04cbb
commit
dd97e75d44
12
Dockerfile
12
Dockerfile
@ -40,6 +40,13 @@ USER comfyui
|
|||||||
RUN python -m venv .venv
|
RUN python -m venv .venv
|
||||||
ENV PATH="/comfyui/.venv/bin:$PATH"
|
ENV PATH="/comfyui/.venv/bin:$PATH"
|
||||||
|
|
||||||
|
# Take PIP_EXTRA_INDEX_URL as a required build argument and bake it into the
|
||||||
|
# image as an environment variable. This variable is then used to select
|
||||||
|
# hardware-specific flavors of PyTorch, enabling support for CPU, AMD, and newer
|
||||||
|
# CUDA inference.
|
||||||
|
ARG PIP_EXTRA_INDEX_URL
|
||||||
|
ENV PIP_EXTRA_INDEX_URL=${PIP_EXTRA_INDEX_URL}
|
||||||
|
|
||||||
# Install ComfyUI's Python dependencies. Although dependency keeping is also
|
# Install ComfyUI's Python dependencies. Although dependency keeping is also
|
||||||
# performed at startup, building ComfyUI's base dependencies into the image
|
# performed at startup, building ComfyUI's base dependencies into the image
|
||||||
# significantly speeds up each containers' first run.
|
# significantly speeds up each containers' first run.
|
||||||
@ -47,7 +54,10 @@ ENV PATH="/comfyui/.venv/bin:$PATH"
|
|||||||
# 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 manager_requirements.txt ./
|
||||||
RUN pip install --no-cache-dir --disable-pip-version-check \
|
RUN pip install \
|
||||||
|
--no-cache-dir \
|
||||||
|
--disable-pip-version-check \
|
||||||
|
--extra-index-url "${PIP_EXTRA_INDEX_URL}" \
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
|
|
||||||
# Install ComfyUI
|
# Install ComfyUI
|
||||||
|
|||||||
@ -365,8 +365,11 @@ For models compatible with Iluvatar Extension for PyTorch. Here's a step-by-step
|
|||||||
|
|
||||||
Start by installing Docker, Docker Compose, and the NVIDIA Container Toolkit on
|
Start by installing Docker, Docker Compose, and the NVIDIA Container Toolkit on
|
||||||
your host. Next, edit `compose.yaml` and update the `UID` and `GID` variables to
|
your host. Next, edit `compose.yaml` and update the `UID` and `GID` variables to
|
||||||
match your user. Additional fields are documented in the file for further
|
match your host user's UID and GID. Also ensure that `PIP_EXTRA_INDEX_URL`
|
||||||
customization.
|
points to the recommended non-experimental index URL for your hardware, as
|
||||||
|
described in the beginning of the [manual installation
|
||||||
|
section](#manual-install-windows-linux). Additional fields are documented in the
|
||||||
|
file for further customization.
|
||||||
|
|
||||||
Once ready, build and run the image locally:
|
Once ready, build and run the image locally:
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,9 @@ services:
|
|||||||
args:
|
args:
|
||||||
# Declare additional system dependencies for custom nodes
|
# Declare additional system dependencies for custom nodes
|
||||||
APT_EXTRA_PACKAGES:
|
APT_EXTRA_PACKAGES:
|
||||||
|
# Set the value of the --extra-index-url flag to select a specific CUDA,
|
||||||
|
# ROCm, or CPU version.
|
||||||
|
PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cu130"
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 8188:8188
|
- 8188:8188
|
||||||
|
|||||||
@ -48,10 +48,11 @@ done
|
|||||||
# PIP_EXTRA_PACKAGES.
|
# PIP_EXTRA_PACKAGES.
|
||||||
echo "[entrypoint] Updating Python dependencies..."
|
echo "[entrypoint] Updating Python dependencies..."
|
||||||
su -c "
|
su -c "
|
||||||
pip install \\
|
pip install \\
|
||||||
--no-cache-dir \\
|
--no-cache-dir \\
|
||||||
--disable-pip-version-check \\
|
--disable-pip-version-check \\
|
||||||
-r requirements.txt \\
|
--extra-index-url '$PIP_EXTRA_INDEX_URL' \\
|
||||||
|
-r requirements.txt \\
|
||||||
$(find custom_nodes -mindepth 2 -maxdepth 2 -type f -name requirements.txt -printf "-r '%p' ") \\
|
$(find custom_nodes -mindepth 2 -maxdepth 2 -type f -name requirements.txt -printf "-r '%p' ") \\
|
||||||
$PIP_EXTRA_PACKAGES
|
$PIP_EXTRA_PACKAGES
|
||||||
" comfyui \
|
" comfyui \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user