Skip to content

Commit 37d5146

Browse files
authored
Merge pull request #1740 from jiridanek/jd_latex_packages
RHAIENG-2189: build(runtime/datascience): set extra python index for aipcc migration phase 1.5
2 parents d2ee809 + 300b79a commit 37d5146

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ FROM ${BASE_IMAGE} AS cpu-base
1010

1111
ARG TARGETARCH
1212

13+
# RHAIENG-2189: this is AIPCC migration phase 1.5
14+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
15+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
16+
1317
WORKDIR /opt/app-root/bin
1418

1519
# OS Packages needs to be installed as root
@@ -44,17 +48,33 @@ EOF
4448
RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked,id=notebooks-dnf /bin/bash <<'EOF'
4549
set -Eeuxo pipefail
4650
echo "Building for architecture: ${TARGETARCH}"
47-
PACKAGES="perl mesa-libGL skopeo libxcrypt-compat"
51+
PACKAGES=(perl mesa-libGL skopeo libxcrypt-compat)
52+
# Datascience packages devel dependencies
53+
if [ "$TARGETARCH" = "s390x" ] || [ "$TARGETARCH" = "ppc64le" ]; then
54+
PACKAGES+=(
55+
# required to compile pillow
56+
zlib-devel libjpeg-turbo-devel
57+
# optional pillow deps https://pillow.readthedocs.io/en/latest/installation/building-from-source.html#external-libraries
58+
#libtiff-devel libwebp-devel openjpeg2-devel lcms2-devel freetype-devel
59+
#libimagequant-devel harfbuzz-devel fribidi-devel
60+
61+
# required to compile maturin
62+
openssl-devel
63+
64+
# required to compile scikit-learn
65+
gcc-gfortran
66+
)
67+
fi
4868
# Additional dev tools only for s390x
4969
if [ "$TARGETARCH" = "s390x" ]; then
50-
PACKAGES="$PACKAGES gcc gcc-c++ make openssl-devel autoconf automake libtool cmake python3-devel pybind11-devel openblas-devel unixODBC-devel openssl zlib-devel"
70+
PACKAGES+=("gcc" "gcc-c++" "make" "openssl-devel" "autoconf" "automake" "libtool" "cmake" "python3-devel" "pybind11-devel" "openblas-devel" "unixODBC-devel" "openssl" "zlib-devel")
5171
fi
5272
if [ "$TARGETARCH" = "ppc64le" ]; then
53-
PACKAGES="$PACKAGES git gcc-toolset-13 make wget unzip rust cargo unixODBC-devel cmake ninja-build"
73+
PACKAGES+=(git gcc-toolset-13 make wget unzip rust cargo unixODBC-devel cmake ninja-build)
5474
fi
5575
if [ -n "$PACKAGES" ]; then
5676
echo "Installing: $PACKAGES"
57-
dnf install -y --setopt=keepcache=1 $PACKAGES
77+
dnf install -y --setopt=keepcache=1 "${PACKAGES[@]}"
5878
fi
5979
EOF
6080

@@ -290,7 +310,8 @@ if [ "$TARGETARCH" = "ppc64le" ]; then
290310
export ARROW_HOME
291311
LD_LIBRARY_PATH=$(pwd)/dist/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
292312
export LD_LIBRARY_PATH
293-
export CMAKE_PREFIX_PATH=$ARROW_HOME:$CMAKE_PREFIX_PATH
313+
CMAKE_PREFIX_PATH=$ARROW_HOME${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}
314+
export CMAKE_PREFIX_PATH
294315
export PARQUET_TEST_DATA="${PWD}/cpp/submodules/parquet-testing/data"
295316
export ARROW_TEST_DATA="${PWD}/testing/data"
296317
cmake -S cpp -B cpp/build \

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ FROM ${BASE_IMAGE} AS cpu-base
1313

1414
ARG TARGETARCH
1515

16+
# RHAIENG-2189: this is AIPCC migration phase 1.5
17+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
18+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
19+
1620
WORKDIR /opt/app-root/bin
1721

1822
# OS Packages needs to be installed as root
@@ -52,17 +56,33 @@ EOF
5256
RUN --mount=type=cache,target=/var/cache/dnf /bin/bash <<'EOF'
5357
set -Eeuxo pipefail
5458
echo "Building for architecture: ${TARGETARCH}"
55-
PACKAGES="perl mesa-libGL skopeo libxcrypt-compat"
59+
PACKAGES=(perl mesa-libGL skopeo libxcrypt-compat)
60+
# Datascience packages devel dependencies
61+
if [ "$TARGETARCH" = "s390x" ] || [ "$TARGETARCH" = "ppc64le" ]; then
62+
PACKAGES+=(
63+
# required to compile pillow
64+
zlib-devel libjpeg-turbo-devel
65+
# optional pillow deps https://pillow.readthedocs.io/en/latest/installation/building-from-source.html#external-libraries
66+
#libtiff-devel libwebp-devel openjpeg2-devel lcms2-devel freetype-devel
67+
#libimagequant-devel harfbuzz-devel fribidi-devel
68+
69+
# required to compile maturin
70+
openssl-devel
71+
72+
# required to compile scikit-learn
73+
gcc-gfortran
74+
)
75+
fi
5676
# Additional dev tools only for s390x
5777
if [ "$TARGETARCH" = "s390x" ]; then
58-
PACKAGES="$PACKAGES gcc gcc-c++ make openssl-devel autoconf automake libtool cmake python3-devel pybind11-devel openblas-devel unixODBC-devel openssl zlib-devel"
78+
PACKAGES+=("gcc" "gcc-c++" "make" "openssl-devel" "autoconf" "automake" "libtool" "cmake" "python3-devel" "pybind11-devel" "openblas-devel" "unixODBC-devel" "openssl" "zlib-devel")
5979
fi
6080
if [ "$TARGETARCH" = "ppc64le" ]; then
61-
PACKAGES="$PACKAGES git gcc-toolset-13 make wget unzip rust cargo unixODBC-devel cmake ninja-build"
81+
PACKAGES+=(git gcc-toolset-13 make wget unzip rust cargo unixODBC-devel cmake ninja-build)
6282
fi
6383
if [ -n "$PACKAGES" ]; then
6484
echo "Installing: $PACKAGES"
65-
dnf install -y $PACKAGES
85+
dnf install -y "${PACKAGES[@]}"
6686
dnf clean all
6787
rm -rf /var/cache/yum
6888
fi
@@ -301,7 +321,8 @@ if [ "$TARGETARCH" = "ppc64le" ]; then
301321
export ARROW_HOME
302322
LD_LIBRARY_PATH=$(pwd)/dist/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
303323
export LD_LIBRARY_PATH
304-
export CMAKE_PREFIX_PATH=$ARROW_HOME:$CMAKE_PREFIX_PATH
324+
CMAKE_PREFIX_PATH=$ARROW_HOME${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}
325+
export CMAKE_PREFIX_PATH
305326
export PARQUET_TEST_DATA="${PWD}/cpp/submodules/parquet-testing/data"
306327
export ARROW_TEST_DATA="${PWD}/testing/data"
307328
cmake -S cpp -B cpp/build \

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ ARG BASE_IMAGE
88
####################
99
FROM ${BASE_IMAGE} AS cpu-base
1010

11+
# RHAIENG-2189: this is AIPCC migration phase 1.5
12+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
13+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
14+
1115
WORKDIR /opt/app-root/bin
1216

1317
# OS Packages needs to be installed as root

runtimes/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ FROM registry.access.redhat.com/ubi9/ubi AS ubi-repos
1111
####################
1212
FROM ${BASE_IMAGE} AS cpu-base
1313

14+
# RHAIENG-2189: this is AIPCC migration phase 1.5
15+
ENV PIP_EXTRA_INDEX_URL=https://pypi.org/simple
16+
ENV UV_EXTRA_INDEX_URL=https://pypi.org/simple
17+
1418
WORKDIR /opt/app-root/bin
1519

1620
# OS Packages needs to be installed as root

0 commit comments

Comments
 (0)