Symlink uv binary to /usr/local/bin for pip build envs
Some checks failed
Build ROCm Image / build (push) Failing after 1m30s

pip's isolated build environments inherit system PATH but don't get
the uv binary automatically. Symlinking via uv.find_uv_bin() makes it
available so resemble-perth's uv-build backend can execute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 10:53:14 -04:00
parent 5d1689e7f4
commit 88c2084d19

View File

@@ -17,8 +17,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app WORKDIR /app
# Install uv so packages that use uv-build as their build backend can be built. # Install uv and expose its bundled binary so pip isolated build environments
RUN pip3 install uv # can find it when building packages that use uv-build (e.g. resemble-perth).
RUN pip3 install uv && \
ln -sf "$(python3 -c 'import uv; print(uv.find_uv_bin())')" /usr/local/bin/uv
# Step 1: Install ROCm-compatible PyTorch stack first. # Step 1: Install ROCm-compatible PyTorch stack first.
# This must happen before anything else to prevent pip from pulling CPU wheels. # This must happen before anything else to prevent pip from pulling CPU wheels.