Skip to content

Commit 7db0feb

Browse files
RHAIENG-1238: fix(codeserver/ppc64le): remove EPEL from final image of Codeserver (#2561)
Signed-off-by: Md. Shafi Hussain <[email protected]> Co-authored-by: Jiri Daněk <[email protected]>
1 parent 74811d1 commit 7db0feb

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ RUN dnf install -y perl mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/
9696
RUN --mount=type=cache,from=whl-cache,source=/root/OpenBLAS,target=/OpenBlas,rw \
9797
bash -c ' \
9898
if [[ $(uname -m) == "ppc64le" ]]; then \
99-
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm; \
100-
dnf install -y lcms2 libraqm libimagequant openjpeg2; \
10199
PREFIX=/usr/ make install -C /OpenBlas; \
102100
fi '
103101

codeserver/ubi9-python-3.12/devel_env_setup.sh

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,32 @@ set -eoux pipefail
99
export WHEEL_DIR=${WHEEL_DIR:-"/wheelsdir"}
1010
mkdir -p ${WHEEL_DIR}
1111

12+
build_pillow() {
13+
CURDIR=$(pwd)
14+
15+
export PILLOW_VERSION=$1
16+
17+
TEMP_BUILD_DIR=$(mktemp -d)
18+
cd ${TEMP_BUILD_DIR}
19+
20+
: ================== Installing Pillow ==================
21+
git clone --recursive https://github.com/python-pillow/Pillow.git -b ${PILLOW_VERSION}
22+
cd Pillow
23+
uv build --wheel --out-dir /pillowwheel
24+
25+
: ================= Fix Pillow Wheel ====================
26+
cd /pillowwheel
27+
uv pip install auditwheel
28+
auditwheel repair pillow*.whl
29+
mv wheelhouse/pillow*.whl ${WHEEL_DIR}
30+
31+
cd ${CURDIR}
32+
rm -rf ${TEMP_BUILD_DIR}
33+
}
1234
build_pyarrow() {
1335
CURDIR=$(pwd)
1436

15-
export PYARROW_VERSION=${1:-$(curl -s https://api.github.com/repos/apache/arrow/releases/latest | jq -r '.tag_name' | grep -Eo "[0-9\.]+")}
37+
export PYARROW_VERSION=$1
1638

1739
TEMP_BUILD_DIR=$(mktemp -d)
1840
cd ${TEMP_BUILD_DIR}
@@ -44,7 +66,8 @@ build_pyarrow() {
4466
if [[ $(uname -m) == "ppc64le" ]]; then
4567
# install development packages
4668
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
47-
dnf install -y cmake gcc-toolset-13 fribidi-devel lcms2-devel \
69+
# patchelf: needed by `auditwheel repair`
70+
dnf install -y cmake gcc-toolset-13 fribidi-devel lcms2-devel patchelf \
4871
libimagequant-devel libraqm-devel openjpeg2-devel tcl-devel tk-devel
4972

5073
# install rust
@@ -73,6 +96,10 @@ if [[ $(uname -m) == "ppc64le" ]]; then
7396

7497
PYARROW_VERSION=$(grep -A1 '"pyarrow"' pylock.toml | grep -Eo '\b[0-9\.]+\b')
7598
build_pyarrow ${PYARROW_VERSION}
99+
100+
PILLOW_VERSION=$(grep -A1 '"pillow"' pylock.toml | grep -Eo '\b[0-9\.]+\b')
101+
build_pillow ${PILLOW_VERSION}
102+
76103
uv pip install ${WHEEL_DIR}/*.whl
77104
else
78105
# only for mounting on non-ppc64le

0 commit comments

Comments
 (0)