Skip to content

Commit 06394bd

Browse files
committed
RHAIENG-2174: build(trustyai): fix build failure "no space left on device" due to AIPCC base disabling uv cache
1 parent ce64808 commit 06394bd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pip install --no-cache-dir uv
5959
source ./devel_env_setup.sh
6060
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
6161
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
62-
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
62+
UV_NO_CACHE=false 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
6363
EOF
6464

6565
# dummy file to make image build wait for this stage
@@ -287,7 +287,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
287287
--mount=type=cache,from=whl-cache,source=/wheelsdir/,target=/wheelsdir/,rw /bin/bash <<'EOF'
288288
set -Eeuxo pipefail
289289
if [[ $(uname -m) == "ppc64le" ]] || [[ $(uname -m) == "s390x" ]]; then
290-
uv pip install /wheelsdir/*.whl
290+
UV_NO_CACHE=false uv pip install /wheelsdir/*.whl
291291
fi
292292
EOF
293293

@@ -296,8 +296,7 @@ RUN --mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
296296
set -Eeuxo pipefail
297297
echo "Installing softwares and packages"
298298
# we can ensure wheels are consumed from the cache only by restricting internet access for uv install with '--offline' flag
299-
# TODO(jdanek): seen some builds fail on GitHub Actions with --offline and see no need to limit ourselves to the cache, will remove this
300-
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --requirements=./pylock.toml
299+
UV_NO_CACHE=false UV_LINK_MODE=copy uv pip install --offline --cache-dir /root/.cache/uv --requirements=./pylock.toml
301300
# Note: debugpy wheel availabe on pypi (in uv cache) is none-any but bundles amd64.so files
302301
# Build debugpy from source instead
303302
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.cpu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pip install --no-cache-dir uv
4242
source ./devel_env_setup.sh
4343
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
4444
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
45-
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
45+
UV_NO_CACHE=false 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
4646
EOF
4747

4848
####################
@@ -214,15 +214,15 @@ RUN --mount=type=cache,from=whl-cache,source=/wheelsdir/,target=/wheelsdir/,rw \
214214
set -Eeuxo pipefail
215215
ARCH=$(uname -m)
216216
if [ "$ARCH" = "ppc64le" ] || [ "$ARCH" = "s390x" ]; then
217-
UV_LINK_MODE=copy uv pip install /wheelsdir/*.whl accelerate --cache-dir /root/.cache/uv
217+
UV_NO_CACHE=false UV_LINK_MODE=copy uv pip install /wheelsdir/*.whl accelerate --cache-dir /root/.cache/uv
218218
fi
219219
EOF
220220

221221
RUN --mount=type=cache,target=/root/.cache/uv /bin/bash <<'EOF'
222222
set -Eeuxo pipefail
223223
echo "Installing softwares and packages"
224224
# we can ensure wheels are consumed from the cache only by restricting internet access for uv install with '--offline' flag
225-
UV_LINK_MODE=copy uv pip install --cache-dir /root/.cache/uv --requirements=./pylock.toml
225+
UV_NO_CACHE=false UV_LINK_MODE=copy uv pip install --offline --cache-dir /root/.cache/uv --requirements=./pylock.toml
226226
# Note: debugpy wheel availabe on pypi (in uv cache) is none-any but bundles amd64.so files
227227
# Build debugpy from source instead
228228
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)