Skip to content

Commit d91bb6a

Browse files
authored
RHAIENG-287: fix(runtime/datascience): set same permissions for group as for owner for OpenShift compatibility (opendatahub-io#2589)
``` =================================== FAILURES =================================== _ TestBaseImage.test_file_permissions[ghcr.io/opendatahub-io/notebooks/workbench-images:runtime-datascience-ubi9-python-3.12-_fdc10eaf1ab4a40309e04a455f9b9a79989c8130] [Checking permissions of the: /opt/app-root/share] _ tests/containers/base_image_test.py:243: in test_fn assert cleaned_output == f"{item[1]}:{item[2]}:{item[3]}" E AssertionError: assert '775:0:0' == '775:0:1001' E E - 775:0:1001 E ? - -- E + 775:0:0 ``` * see also issue opendatahub-io#2580, PR opendatahub-io#2581 * and opendatahub-io#2465 which introduced the root thing in trustyai
1 parent f1a1578 commit d91bb6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \
369369
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
370370
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml; \
371371
fi && \
372+
# change ownership to default user (all packages were installed as root and has root:root ownership
373+
chown -R 1001:0 /opt/app-root/ && \
374+
chmod -R g=u /opt/app-root && \
372375
# Fix permissions to support pip in Openshift environments
373376
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \
374377
fix-permissions /opt/app-root -P

0 commit comments

Comments
 (0)