Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv pip compile requires --universal flag #223

Open
2 tasks
M1kep opened this issue Dec 29, 2024 · 0 comments
Open
2 tasks

uv pip compile requires --universal flag #223

M1kep opened this issue Dec 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@M1kep
Copy link

M1kep commented Dec 29, 2024

Describe the bug
uv pip compile appears to require the --universal flag to complete.

To Reproduce
config.ini

[DEFAULT]
enable_tracking = False

Dockerfile

# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim

# Install the project into `/app`
WORKDIR /app

# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy

RUN apt update
RUN apt install -y git

RUN uv pip install --system comfy-cli

COPY config.ini /root/.config/comfy-cli/config.ini

RUN --mount=type=cache,target=/root/.cache/uv \
    comfy --skip-prompt --here install --nvidia --fast-deps

COPY ./extra_model_paths.yaml /root/.comfy/extra_model_paths.yaml

## Reset the entrypoint, don't invoke `uv`
ENTRYPOINT []
CMD ["comfy", "launch", "--", "--listen", "0.0.0.0"]

Run: docker build --progress plain .

Output

...
#11 [stage-0 7/9] RUN --mount=type=cache,target=/root/.cache/uv     comfy --skip-prompt --here install --nvidia --fast-deps
#11 1.134 Installing from repository 'https://github.com/comfyanonymous/ComfyUI' to
#11 1.134 '/app/ComfyUI'
#11 1.138 Cloning into '/app/ComfyUI'...
#11 5.014
#11 5.015
#11 5.015 Installing ComfyUI-Manager..
#11 5.016 Cloning into '/app/ComfyUI/custom_nodes/ComfyUI-Manager'...
#11 6.848 CalledProcessError
#11 6.848 Command '['/usr/local/bin/python', '-m', 'uv', 'pip', 'compile', '/app/ComfyUI/requirements.txt', '--index-strategy', 'unsafe-best-match', '--override', '/app/override.txt']' returned non-zero exit status 2.
#11 6.848 STDOUT:
#11 6.848
#11 6.848 STDERR:
#11 6.848 thread 'uv-resolver' panicked at crates/uv-resolver/src/resolver/environment.rs:568:9:
#11 6.848 resolver must be in universal mode for forking
#11 6.848 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#11 6.848 error: The channel closed unexpectedly
#11 6.848
...

Expected behavior
ComfyUI to successfully install.

Nice to have

  • Terminal output
  • Screenshots

Additional context
Adding "--universal" to the command resolved this issue for me:
https://github.com/Comfy-Org/comfy-cli/blob/main/comfy_cli/uv.py#L110-L128

@M1kep M1kep added the bug Something isn't working label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant