Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions jupyter/trustyai/ubi9-python-3.12/devel_env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ else
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig}
fi

# compiling jpype1==1.5.0 requires g++ and this gets compiled on all platforms
# gcc and g++ is present by default on registry.access.redhat.com/ubi9/python-312:latest
dnf install -y --setopt=keepcache=1 gcc gcc-g++
Comment on lines +21 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix incorrect package name: use gcc-c++ instead of gcc-g++.

The package gcc-g++ does not exist in the UBI9 repository. The correct package name for the C++ compiler is gcc-c++. This will cause the dnf install command to fail.

This inconsistency is evident when comparing with line 41, where the correct gcc-c++ package is used for s390x.

Apply this diff to fix the package name:

-dnf install -y --setopt=keepcache=1 gcc gcc-g++
+dnf install -y --setopt=keepcache=1 gcc gcc-c++
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# compiling jpype1==1.5.0 requires g++ and this gets compiled on all platforms
# gcc and g++ is present by default on registry.access.redhat.com/ubi9/python-312:latest
dnf install -y --setopt=keepcache=1 gcc gcc-g++
# compiling jpype1==1.5.0 requires g++ and this gets compiled on all platforms
# gcc and g++ is present by default on registry.access.redhat.com/ubi9/python-312:latest
dnf install -y --setopt=keepcache=1 gcc gcc-c++
🤖 Prompt for AI Agents
In jupyter/trustyai/ubi9-python-3.12/devel_env_setup.sh around lines 21 to 23,
the dnf install uses the non-existent package name gcc-g++; replace it with the
correct UBI9 package name gcc-c++ so the C++ compiler installs correctly (make
the same change as used on line 41), and ensure the dnf command remains
otherwise unchanged.


WHEELS_DIR=/wheelsdir
mkdir -p ${WHEELS_DIR}
if [[ $(uname -m) == "ppc64le" ]] || [[ $(uname -m) == "s390x" ]]; then
Expand All @@ -26,9 +30,12 @@ if [[ $(uname -m) == "ppc64le" ]] || [[ $(uname -m) == "s390x" ]]; then
# install development packages
dnf install -y --setopt=keepcache=1 https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# patchelf: needed by `auditwheel repair`
dnf install -y --setopt=keepcache=1 fribidi-devel gcc-toolset-13 lcms2-devel libimagequant-devel patchelf \
dnf install -y --setopt=keepcache=1 fribidi-devel lcms2-devel libimagequant-devel patchelf \
libraqm-devel openjpeg2-devel tcl-devel tk-devel unixODBC-devel

# previously we installed but never activated (added to PATH, etc.) the gcc-toolset-13, which suggests that maybe
# regular gcc/g++ is just fine

# Install build tools and libraries needed for compiling PyTorch/PyArrow
if [[ $(uname -m) == "s390x" ]]; then
dnf install -y --setopt=keepcache=1 gcc gcc-gfortran gcc-c++ make cmake ninja-build \
Expand Down Expand Up @@ -122,7 +129,7 @@ if [[ $(uname -m) == "ppc64le" ]] || [[ $(uname -m) == "s390x" ]]; then
# Pyarrow
PYARROW_VERSION=$(grep -A1 '"pyarrow"' pylock.toml | grep -Eo '\b[0-9\.]+\b')
cd ${TMP}
git clone --depth 1 --branch "apache-arrow-${PYARROW_VERSION}" --recurse-submodules --shallow-submodules https://github.com/apache/arrow.git
git clone --depth 1 --branch "apache-arrow-${PYARROW_VERSION}" --recurse-submodules --shallow-submodules https://github.com/apache/arrow.git
cd arrow/cpp
mkdir build && cd build && \
# Set architecture-specific CMake flags
Expand Down
Loading