Skip to content

Commit f5b5e83

Browse files
committed
RHAIENG-2111: chore(trustyai): enable pypi to get access to required build dependencies
* uv is not present in 3.0 aipcc indes (it is in 3.2 though) ``` + pip install --no-cache-dir uv Looking in indexes: https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cpu-ubi9/simple/ ERROR: Could not find a version that satisfies the requirement uv (from versions: none) ``` * cython is a build dependency for pandas ``` Downloading scipy Building pandas==1.5.3 × Failed to download and build `pandas==1.5.3` ├─▶ Failed to resolve requirements from `build-system.requires` ├─▶ No solution found when resolving: `setuptools>=51.0.0`, `wheel`, │ `cython>=0.29.32, <3`, `oldest-supported-numpy>=2022.8.16` ╰─▶ Because only cython>=3.0.12 is available and you require cython>=0.29.32,<3, we can conclude that your requirements are unsatisfiable. subprocess exited with status 1 ```
1 parent 26ec259 commit f5b5e83

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ COPY ${TRUSTYAI_SOURCE_CODE}/devel_env_setup.sh .
3737
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked,id=notebooks-dnf \
3838
--mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
3939
set -Eeuxo pipefail
40-
pip install --no-cache-dir uv
40+
# RHAIENG-2111: Looking in indexes: https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cpu-ubi9/simple/
41+
# ERROR: Could not find a version that satisfies the requirement uv (from versions: none)
42+
pip install --no-cache-dir --extra-index-url https://pypi.org/simple uv
4143

4244
# If we have a Red Hat subscription prepared, refresh it
4345
if command -v subscription-manager &> /dev/null; then
@@ -48,7 +50,8 @@ fi
4850
source ./devel_env_setup.sh
4951
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
5052
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
51-
UV_LINK_MODE=copy uv pip install --strict --no-deps --refresh --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
53+
# RHAIENG-2111: building pandas requires cython from PyPI
54+
UV_LINK_MODE=copy uv pip install --strict --no-deps --refresh --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --extra-index-url https://pypi.org/simple --requirements=./pylock.toml
5255
EOF
5356

5457
####################
@@ -232,7 +235,8 @@ RUN --mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
232235
set -Eeuxo pipefail
233236
echo "Installing softwares and packages"
234237
# we can ensure wheels are consumed from the cache only by restricting internet access for uv install with '--offline' flag
235-
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --requirements=./pylock.toml
238+
# RHAIENG-2111: building pandas requires cython from PyPI
239+
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --extra-index-url https://pypi.org/simple --requirements=./pylock.toml
236240
# Note: debugpy wheel availabe on pypi (in uv cache) is none-any but bundles amd64.so files
237241
# Build debugpy from source instead
238242
UV_LINK_MODE=copy uv pip install --no-cache git+https://github.com/microsoft/debugpy.git@v$(grep -A1 '\"debugpy\"' ./pylock.toml | grep -Eo '\b[0-9\.]+\b')

jupyter/trustyai/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ EOF
5454

5555
RUN --mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
5656
set -Eeuxo pipefail
57-
pip install --no-cache-dir uv
57+
# RHAIENG-2111: Looking in indexes: https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cpu-ubi9/simple/
58+
# ERROR: Could not find a version that satisfies the requirement uv (from versions: none)
59+
pip install --no-cache-dir --extra-index-url https://pypi.org/simple uv
5860

5961
# the devel script is ppc64le and s390x specific - sets up build-time dependencies
6062
source ./devel_env_setup.sh
6163
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
6264
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
63-
UV_LINK_MODE=copy uv pip install --strict --no-deps --refresh --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
65+
# RHAIENG-2111: building pandas requires cython from PyPI
66+
UV_LINK_MODE=copy uv pip install --strict --no-deps --refresh --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --extra-index-url https://pypi.org/simple --requirements=./pylock.toml
6467
EOF
6568

6669
####################
@@ -252,7 +255,8 @@ RUN --mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
252255
set -Eeuxo pipefail
253256
echo "Installing softwares and packages"
254257
# we can ensure wheels are consumed from the cache only by restricting internet access for uv install with '--offline' flag
255-
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --requirements=./pylock.toml
258+
# RHAIENG-2111: building pandas requires cython from PyPI
259+
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --extra-index-url https://pypi.org/simple --requirements=./pylock.toml
256260
# Note: debugpy wheel availabe on pypi (in uv cache) is none-any but bundles amd64.so files
257261
# Build debugpy from source instead
258262
UV_LINK_MODE=copy uv pip install --no-cache git+https://github.com/microsoft/debugpy.git@v$(grep -A1 '\"debugpy\"' ./pylock.toml | grep -Eo '\b[0-9\.]+\b')

0 commit comments

Comments
 (0)