Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions codeserver/ubi9-python-3.12/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ RUN dnf install -y perl mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/
RUN --mount=type=cache,from=whl-cache,source=/root/OpenBLAS,target=/OpenBlas,rw \
bash -c ' \
if [[ $(uname -m) == "ppc64le" ]]; then \
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm; \
dnf install -y lcms2 libraqm libimagequant openjpeg2; \
PREFIX=/usr/ make install -C /OpenBlas; \
fi '

Expand Down
30 changes: 28 additions & 2 deletions codeserver/ubi9-python-3.12/devel_env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,32 @@ set -eoux pipefail
export WHEEL_DIR=${WHEEL_DIR:-"/wheelsdir"}
mkdir -p ${WHEEL_DIR}

build_pillow() {
CURDIR=$(pwd)

export PILLOW_VERSION=$1

TEMP_BUILD_DIR=$(mktemp -d)
cd ${TEMP_BUILD_DIR}

: ================== Installing Pillow ==================
git clone --recursive https://github.com/python-pillow/Pillow.git -b ${PILLOW_VERSION}
cd Pillow
uv build --wheel --out-dir /pillowwheel

: ================= Fix Pillow Wheel ====================
cd /pillowwheel
uv pip install auditwheel
auditwheel repair pillow*.whl
mv wheelhouse/pillow*.whl ${WHEEL_DIR}

cd ${CURDIR}
rm -rf ${TEMP_BUILD_DIR}
}
build_pyarrow() {
CURDIR=$(pwd)

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

TEMP_BUILD_DIR=$(mktemp -d)
cd ${TEMP_BUILD_DIR}
Expand Down Expand Up @@ -44,7 +66,7 @@ build_pyarrow() {
if [[ $(uname -m) == "ppc64le" ]]; then
# install development packages
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install -y cmake gcc-toolset-13 fribidi-devel lcms2-devel \
dnf install -y cmake gcc-toolset-13 fribidi-devel lcms2-devel patchelf \
libimagequant-devel libraqm-devel openjpeg2-devel tcl-devel tk-devel

# install rust
Expand Down Expand Up @@ -73,6 +95,10 @@ if [[ $(uname -m) == "ppc64le" ]]; then

PYARROW_VERSION=$(grep -A1 '"pyarrow"' pylock.toml | grep -Eo '\b[0-9\.]+\b')
build_pyarrow ${PYARROW_VERSION}

PILLOW_VERSION=$(grep -A1 '"pillow"' pylock.toml | grep -Eo '\b[0-9\.]+\b')
build_pillow ${PILLOW_VERSION}

uv pip install ${WHEEL_DIR}/*.whl
else
# only for mounting on non-ppc64le
Expand Down
Loading