Skip to content

Commit 3c7287e

Browse files
authored
Merge pull request #3042 from ysok-opendatahub-io/RHAIENG-2860-odh-rhds-hermetic-codeserver
RHAIENG-2860: Enable hermetic build for codeserver/ubi9-python-3.12
2 parents 245bff3 + 0afb8fb commit 3c7287e

File tree

5 files changed

+46
-46
lines changed

5 files changed

+46
-46
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ RUN if [ "${LOCAL_BUILD}" = "true" ]; then \
343343
# [HERMETIC] Install useful OS packages from prefetched RPMs.
344344
# nodejs: provides libnode.so needed at runtime by code-server's bundled node binary
345345
# (installed via rpm2cpio which skips dependency resolution).
346+
# cpio: required for rpm2cpio | cpio -idmv below (install here to avoid a second dnf call).
346347
RUN /bin/bash <<'EOF'
347348
set -Eeuxo pipefail
348349
PACKAGES=(
@@ -352,6 +353,7 @@ PACKAGES=(
352353
gettext
353354
# nss_wrapper: required by generate_container_user (LD_PRELOAD=libnss_wrapper.so)
354355
nss_wrapper
356+
cpio
355357
)
356358
dnf install -y "${PACKAGES[@]}"
357359
dnf clean all
@@ -368,8 +370,6 @@ COPY --from=rpm-base /tmp/code-server-*.rpm /tmp/
368370
# Install code-server via rpm2cpio (dnf rejects unsigned RPMs built from source on Konflux/Conforma)
369371
RUN /bin/bash <<'EOF'
370372
set -Eeuxo pipefail
371-
dnf install -y cpio
372-
dnf -y clean all
373373
cd /
374374
rpm2cpio /tmp/code-server-${CODESERVER_VERSION/v/}-*.rpm | cpio -idmv
375375
EOF

codeserver/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ RUN if [ "${LOCAL_BUILD}" = "true" ]; then \
341341
# [HERMETIC] Install useful OS packages from prefetched RPMs.
342342
# nodejs: provides libnode.so needed at runtime by code-server's bundled node binary
343343
# (installed via rpm2cpio which skips dependency resolution).
344+
# cpio: required for rpm2cpio | cpio -idmv below (install here to avoid a second dnf call).
344345
RUN /bin/bash <<'EOF'
345346
set -Eeuxo pipefail
346347
PACKAGES=(
@@ -350,6 +351,7 @@ PACKAGES=(
350351
gettext
351352
# nss_wrapper: required by generate_container_user (LD_PRELOAD=libnss_wrapper.so)
352353
nss_wrapper
354+
cpio
353355
)
354356
dnf install -y "${PACKAGES[@]}"
355357
dnf clean all
@@ -366,8 +368,6 @@ COPY --from=rpm-base /tmp/code-server-*.rpm /tmp/
366368
# Install code-server via rpm2cpio (dnf rejects unsigned RPMs built from source on Konflux/Conforma)
367369
RUN /bin/bash <<'EOF'
368370
set -Eeuxo pipefail
369-
dnf install -y cpio
370-
dnf -y clean all
371371
cd /
372372
rpm2cpio /tmp/code-server-${CODESERVER_VERSION/v/}-*.rpm | cpio -idmv
373373
EOF
@@ -470,7 +470,8 @@ COPY --chown=1001:0 ${CODESERVER_SOURCE_CODE}/run-code-server.sh ${CODESERVER_SO
470470

471471
ENV SHELL=/bin/bash
472472

473-
ENV PYTHONPATH=/opt/app-root/bin/python3
473+
# Directory where uv pip install puts packages; PYTHONPATH must be a directory, not the python binary.
474+
ENV PYTHONPATH=/opt/app-root/lib/python3.12/site-packages
474475

475476
# Copy requirements files (pylock.toml for metadata; requirements.txt used for installation)
476477
COPY ${CODESERVER_SOURCE_CODE}/uv.lock.d/pylock.${PYLOCK_FLAVOR}.toml ./pylock.toml

codeserver/ubi9-python-3.12/prefetch-input/rhds/artifacts.lock.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ artifacts:
5050
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-x86_64-unknown-linux-musl.tar.gz
5151
checksum: sha256:324cd645481db1ceda8621409c9151fc58d182b90cc5c428db80edb21fb26df3
5252
filename: ripgrep-v13.0.0-13-x86_64-unknown-linux-musl.tar.gz
53-
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-aarch64-unknown-linux-musl.tar.gz
54-
checksum: sha256:0f308620a428f56fe871fcc5d7c668c461dfed3244f717b698f3e9e92aca037a
53+
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-aarch64-unknown-linux-gnu.tar.gz
54+
checksum: sha256:1b0ca509f8707f2128f1b3ef245c3ea666d49a737431288536d49bd74652d143
5555
filename: ripgrep-v13.0.0-13-aarch64-unknown-linux-musl.tar.gz
5656
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-powerpc64le-unknown-linux-gnu.tar.gz
5757
checksum: sha256:a3fdb2c6ef9d4ff927ca1cb1e56f7aed7913d1be4dd4546aec400118c26452ab
58-
filename: ripgrep-v13.0.0-13-powerpc64le-unknown-linux-gnu.tar.gz
58+
filename: ripgrep-v13.0.0-13-powerpc64le-unknown-linux-musl.tar.gz
5959
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-13/ripgrep-v13.0.0-13-s390x-unknown-linux-gnu.tar.gz
6060
checksum: sha256:555983c74789d553b107c5a2de90b883727b3e43d680f0cd289a07407efb2755
61-
filename: ripgrep-v13.0.0-13-s390x-unknown-linux-gnu.tar.gz
61+
filename: ripgrep-v13.0.0-13-s390x-unknown-linux-musl.tar.gz
6262
- download_url: https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-4/ripgrep-v13.0.0-4-powerpc64le-unknown-linux-gnu.tar.gz
6363
checksum: sha256:3ddd7c0797c14cefd3ee61f13f15ac219bfecee8e6f6e27fd15c102ef229653a
6464
filename: ripgrep-v13.0.0-4-powerpc64le-unknown-linux-gnu.tar.gz

codeserver/ubi9-python-3.12/prefetch-input/rhds/rpms.lock.yaml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,13 +1460,6 @@ arches:
14601460
name: openblas-openmp
14611461
evr: 0.3.26-2.el9
14621462
sourcerpm: openblas-0.3.26-2.el9.src.rpm
1463-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/appstream/os/Packages/o/openblas-openmp64-0.3.26-2.el9.aarch64.rpm
1464-
repoid: rhel-9-for-x86_64-appstream-rpms
1465-
size: 3544936
1466-
checksum: sha256:58375d20a4bf7aac5fbf45b73dd5bb1a8bc641e0b97b2b5d4ba3c16d80311c07
1467-
name: openblas-openmp64
1468-
evr: 0.3.26-2.el9
1469-
sourcerpm: openblas-0.3.26-2.el9.src.rpm
14701463
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/appstream/os/Packages/o/openblas-serial-0.3.26-2.el9.aarch64.rpm
14711464
repoid: rhel-9-for-x86_64-appstream-rpms
14721465
size: 3498840
@@ -4792,6 +4785,13 @@ arches:
47924785
name: openblas-devel
47934786
evr: 0.3.26-2.el9
47944787
sourcerpm: openblas-0.3.26-2.el9.src.rpm
4788+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/codeready-builder/os/Packages/o/openblas-openmp64-0.3.26-2.el9.aarch64.rpm
4789+
repoid: codeready-builder-for-rhel-9-x86_64-rpms
4790+
size: 3544936
4791+
checksum: sha256:58375d20a4bf7aac5fbf45b73dd5bb1a8bc641e0b97b2b5d4ba3c16d80311c07
4792+
name: openblas-openmp64
4793+
evr: 0.3.26-2.el9
4794+
sourcerpm: openblas-0.3.26-2.el9.src.rpm
47954795
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/codeready-builder/os/Packages/o/openblas-openmp64_-0.3.26-2.el9.aarch64.rpm
47964796
repoid: codeready-builder-for-rhel-9-x86_64-rpms
47974797
size: 3543050
@@ -4864,10 +4864,10 @@ arches:
48644864
sourcerpm: qhull-7.2.1-11.el9.src.rpm
48654865
source: []
48664866
module_metadata:
4867-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/appstream/os/repodata/ff6afbb5590cec985a8abc828c802890617a96ef8078a1572a52a0be7ad59c8a-modules.yaml.gz
4867+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/aarch64/appstream/os/repodata/8c529c0af1d53c7ae34edc350309cc9b9c25bac4bdfe08df09b32d216367a775-modules.yaml.gz
48684868
repoid: rhel-9-for-x86_64-appstream-rpms
48694869
size: 34364
4870-
checksum: sha256:ff6afbb5590cec985a8abc828c802890617a96ef8078a1572a52a0be7ad59c8a
4870+
checksum: sha256:8c529c0af1d53c7ae34edc350309cc9b9c25bac4bdfe08df09b32d216367a775
48714871
- arch: ppc64le
48724872
packages:
48734873
- url: https://cdn.redhat.com/content/dist/layered/rhel9/ppc64le/rhocp/4.16/os/Packages/c/containers-common-1-78.rhaos4.16.el9.ppc64le.rpm
@@ -6347,13 +6347,6 @@ arches:
63476347
name: openblas-openmp
63486348
evr: 0.3.26-2.el9
63496349
sourcerpm: openblas-0.3.26-2.el9.src.rpm
6350-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/appstream/os/Packages/o/openblas-openmp64-0.3.26-2.el9.ppc64le.rpm
6351-
repoid: rhel-9-for-x86_64-appstream-rpms
6352-
size: 4482450
6353-
checksum: sha256:6a1c60419440fe3e2694b407086b7389ac044d81ec030bf8196d5828dde4c5fa
6354-
name: openblas-openmp64
6355-
evr: 0.3.26-2.el9
6356-
sourcerpm: openblas-0.3.26-2.el9.src.rpm
63576350
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/appstream/os/Packages/o/openblas-serial-0.3.26-2.el9.ppc64le.rpm
63586351
repoid: rhel-9-for-x86_64-appstream-rpms
63596352
size: 4389636
@@ -9693,6 +9686,13 @@ arches:
96939686
name: openblas-devel
96949687
evr: 0.3.26-2.el9
96959688
sourcerpm: openblas-0.3.26-2.el9.src.rpm
9689+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/codeready-builder/os/Packages/o/openblas-openmp64-0.3.26-2.el9.ppc64le.rpm
9690+
repoid: codeready-builder-for-rhel-9-x86_64-rpms
9691+
size: 4482450
9692+
checksum: sha256:6a1c60419440fe3e2694b407086b7389ac044d81ec030bf8196d5828dde4c5fa
9693+
name: openblas-openmp64
9694+
evr: 0.3.26-2.el9
9695+
sourcerpm: openblas-0.3.26-2.el9.src.rpm
96969696
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/codeready-builder/os/Packages/o/openblas-openmp64_-0.3.26-2.el9.ppc64le.rpm
96979697
repoid: codeready-builder-for-rhel-9-x86_64-rpms
96989698
size: 4476910
@@ -9765,10 +9765,10 @@ arches:
97659765
sourcerpm: qhull-7.2.1-11.el9.src.rpm
97669766
source: []
97679767
module_metadata:
9768-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/appstream/os/repodata/3d48fbd5859c9b12022268e74dee409a770e366f0f65757b5c28a3df3fb1d5ed-modules.yaml.gz
9768+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/ppc64le/appstream/os/repodata/5b6f42676fc1e04a945f8a63a111e72aaca8bd26d4f69f34abeee1ba6446cb77-modules.yaml.gz
97699769
repoid: rhel-9-for-x86_64-appstream-rpms
97709770
size: 32808
9771-
checksum: sha256:3d48fbd5859c9b12022268e74dee409a770e366f0f65757b5c28a3df3fb1d5ed
9771+
checksum: sha256:5b6f42676fc1e04a945f8a63a111e72aaca8bd26d4f69f34abeee1ba6446cb77
97729772
- arch: s390x
97739773
packages:
97749774
- url: https://cdn.redhat.com/content/dist/layered/rhel9/s390x/rhocp/4.16/os/Packages/c/containers-common-1-78.rhaos4.16.el9.s390x.rpm
@@ -11276,13 +11276,6 @@ arches:
1127611276
name: openblas-openmp
1127711277
evr: 0.3.26-2.el9
1127811278
sourcerpm: openblas-0.3.26-2.el9.src.rpm
11279-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/appstream/os/Packages/o/openblas-openmp64-0.3.26-2.el9.s390x.rpm
11280-
repoid: rhel-9-for-x86_64-appstream-rpms
11281-
size: 3588930
11282-
checksum: sha256:db66489d56d110d855c60a0fbdb36cc4c072137654ec3c13e73340eb90909fd4
11283-
name: openblas-openmp64
11284-
evr: 0.3.26-2.el9
11285-
sourcerpm: openblas-0.3.26-2.el9.src.rpm
1128611279
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/appstream/os/Packages/o/openblas-serial-0.3.26-2.el9.s390x.rpm
1128711280
repoid: rhel-9-for-x86_64-appstream-rpms
1128811281
size: 3523349
@@ -14566,6 +14559,13 @@ arches:
1456614559
name: openblas-devel
1456714560
evr: 0.3.26-2.el9
1456814561
sourcerpm: openblas-0.3.26-2.el9.src.rpm
14562+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/codeready-builder/os/Packages/o/openblas-openmp64-0.3.26-2.el9.s390x.rpm
14563+
repoid: codeready-builder-for-rhel-9-x86_64-rpms
14564+
size: 3588930
14565+
checksum: sha256:db66489d56d110d855c60a0fbdb36cc4c072137654ec3c13e73340eb90909fd4
14566+
name: openblas-openmp64
14567+
evr: 0.3.26-2.el9
14568+
sourcerpm: openblas-0.3.26-2.el9.src.rpm
1456914569
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/codeready-builder/os/Packages/o/openblas-openmp64_-0.3.26-2.el9.s390x.rpm
1457014570
repoid: codeready-builder-for-rhel-9-x86_64-rpms
1457114571
size: 3578513
@@ -14638,10 +14638,10 @@ arches:
1463814638
sourcerpm: qhull-7.2.1-11.el9.src.rpm
1463914639
source: []
1464014640
module_metadata:
14641-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/appstream/os/repodata/3ed776b733945710ce6d2e1c51adb03dd8eef9278642ae85cf3e248606d4f11c-modules.yaml.gz
14641+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/s390x/appstream/os/repodata/618e82350683be2d774e2cbe542232caaff48f4fce79c01ff56b40112bf0b571-modules.yaml.gz
1464214642
repoid: rhel-9-for-x86_64-appstream-rpms
1464314643
size: 33005
14644-
checksum: sha256:3ed776b733945710ce6d2e1c51adb03dd8eef9278642ae85cf3e248606d4f11c
14644+
checksum: sha256:618e82350683be2d774e2cbe542232caaff48f4fce79c01ff56b40112bf0b571
1464514645
- arch: x86_64
1464614646
packages:
1464714647
- url: https://cdn.redhat.com/content/dist/layered/rhel9/x86_64/rhocp/4.16/os/Packages/c/containers-common-1-78.rhaos4.16.el9.x86_64.rpm
@@ -16121,13 +16121,6 @@ arches:
1612116121
name: openblas-openmp
1612216122
evr: 0.3.26-2.el9
1612316123
sourcerpm: openblas-0.3.26-2.el9.src.rpm
16124-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/appstream/os/Packages/o/openblas-openmp64-0.3.26-2.el9.x86_64.rpm
16125-
repoid: rhel-9-for-x86_64-appstream-rpms
16126-
size: 5062343
16127-
checksum: sha256:6bf2f5658c077d2012c488c891f41a98545b701246a23a98f66b1337190fe3a4
16128-
name: openblas-openmp64
16129-
evr: 0.3.26-2.el9
16130-
sourcerpm: openblas-0.3.26-2.el9.src.rpm
1613116124
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/appstream/os/Packages/o/openblas-serial-0.3.26-2.el9.x86_64.rpm
1613216125
repoid: rhel-9-for-x86_64-appstream-rpms
1613316126
size: 5004582
@@ -19474,6 +19467,13 @@ arches:
1947419467
name: openblas-devel
1947519468
evr: 0.3.26-2.el9
1947619469
sourcerpm: openblas-0.3.26-2.el9.src.rpm
19470+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/codeready-builder/os/Packages/o/openblas-openmp64-0.3.26-2.el9.x86_64.rpm
19471+
repoid: codeready-builder-for-rhel-9-x86_64-rpms
19472+
size: 5062343
19473+
checksum: sha256:6bf2f5658c077d2012c488c891f41a98545b701246a23a98f66b1337190fe3a4
19474+
name: openblas-openmp64
19475+
evr: 0.3.26-2.el9
19476+
sourcerpm: openblas-0.3.26-2.el9.src.rpm
1947719477
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/codeready-builder/os/Packages/o/openblas-openmp64_-0.3.26-2.el9.x86_64.rpm
1947819478
repoid: codeready-builder-for-rhel-9-x86_64-rpms
1947919479
size: 5043253
@@ -19546,7 +19546,7 @@ arches:
1954619546
sourcerpm: qhull-7.2.1-11.el9.src.rpm
1954719547
source: []
1954819548
module_metadata:
19549-
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/appstream/os/repodata/fd61f3d858b750437c5274ecbcd5557e0ec92552116b5f04b7aa744ce0edb78c-modules.yaml.gz
19549+
- url: https://cdn.redhat.com/content/dist/rhel9/9.6/x86_64/appstream/os/repodata/618da00859523e2a4bb67ee62e36cf10b141af12f83bd8e2773dd66f668e1e14-modules.yaml.gz
1955019550
repoid: rhel-9-for-x86_64-appstream-rpms
1955119551
size: 34742
19552-
checksum: sha256:fd61f3d858b750437c5274ecbcd5557e0ec92552116b5f04b7aa744ce0edb78c
19552+
checksum: sha256:618da00859523e2a4bb67ee62e36cf10b141af12f83bd8e2773dd66f668e1e14

codeserver/ubi9-python-3.12/requirements.cpu.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ googleapis-common-protos==1.72.0 ; implementation_name == 'cpython' and sys_plat
9090
greenlet==3.3.2 ; (implementation_name == 'cpython' and platform_machine == 'AMD64' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'WIN32' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'aarch64' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'amd64' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'ppc64le' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'win32' and sys_platform == 'linux') or (implementation_name == 'cpython' and platform_machine == 'x86_64' and sys_platform == 'linux') \
9191
--hash=sha256:23d109a14d7c5fe854806c2aaf1c93b5c293e27a5ce2ae7db1cb8ae882cac75c \
9292
--hash=sha256:68ef1ff6bcea69be356e5a805d745d3ab1aecc60aad3db3aaffd8c1ab617c02f \
93-
--hash=sha256:c188631f301fd80d918990ea39561dfb4080c5e23c67b8be3992be2d14b9b1cf \
9493
--hash=sha256:b12423d1bad2cf4a22a1d91d0aa2690503bc10d00b5e12909ae24030872e7858
9594
gunicorn==25.1.0 ; implementation_name == 'cpython' and sys_platform == 'linux' \
9695
--hash=sha256:04f73b7587728045d41c6938e60a60bfb70bff43b9f53d22e691b485de8a7931

0 commit comments

Comments
 (0)