-
Notifications
You must be signed in to change notification settings - Fork 113
RHOAIENG-31406: enable Runtime Datascience Images for IBM Z[s390x] (Python 3.12) #1513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
21c5d74
de86519
d92c38a
33c9fd3
0a7abe8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,6 +8,8 @@ ARG BASE_IMAGE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FROM ${BASE_IMAGE} AS cpu-base | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARG TARGETARCH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WORKDIR /opt/app-root/bin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# OS Packages needs to be installed as root | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -19,7 +21,40 @@ RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_d | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# upgrade first to avoid fixable vulnerabilities end | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install useful OS packages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN dnf install -y mesa-libGL skopeo libxcrypt-compat && dnf clean all && rm -rf /var/cache/yum | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN --mount=type=cache,target=/var/cache/dnf \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo "Building for architecture: ${TARGETARCH}" && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PACKAGES="mesa-libGL skopeo libxcrypt-compat" && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Additional dev tools only for s390x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PACKAGES="$PACKAGES gcc gcc-c++ make openssl-devel autoconf automake libtool cmake python3-devel pybind11-devel openblas-devel unixODBC-devel openssl zlib-devel"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if [ -n "$PACKAGES" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dnf install -y $PACKAGES && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dnf clean all && rm -rf /var/cache/yum; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# For s390x only, set ENV vars and install Rust | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install Rust and set up environment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /opt/.cargo && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export HOME=/root && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chmod +x rustup-init.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CARGO_HOME=/opt/.cargo HOME=/root ./rustup-init.sh -y --no-modify-path && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rm -f rustup-init.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chown -R 1001:0 /opt/.cargo && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Set environment variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo 'export PATH=/opt/.cargo/bin:$PATH' >> /etc/profile.d/cargo.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo 'export CARGO_HOME=/opt/.cargo' >> /etc/profile.d/cargo.sh && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo 'export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1' >> /etc/profile.d/cargo.sh; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+36
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Download-and-execute of - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh && \
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh && \
+ echo "<EXPECTED_SHA256> rustup-init.sh" | sha256sum -c - && \ 📝 Committable suggestion
Suggested change
🧰 Tools🪛 GitHub Actions: Code static analysis[warning] 27-27: Hadolint info SC2016: Expressions don't expand in single quotes, use double quotes for that. 🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Set python alternatives only for s390x (not needed for other arches) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
python --version && python3 --version; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Other apps and tools installed as default user | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
USER 1001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -35,11 +70,69 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rm -f /tmp/openshift-client-linux.tar.gz | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install the oc client end | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
############################## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# wheel-builder stage # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# NOTE: Only used in s390x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
############################## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FROM cpu-base AS s390x-builder | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARG TARGETARCH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
USER 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WORKDIR /tmp/build-wheels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Build pyarrow optimized for s390x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--mount=type=cache,target=/root/.cache/dnf \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install build dependencies (shared for pyarrow and onnx) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dnf install -y cmake make gcc-c++ pybind11-devel wget && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dnf clean all && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Build and collect pyarrow wheel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
git clone --depth 1 https://github.com/apache/arrow.git && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cd arrow/cpp && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir release && cd release && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+91
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Pin Apache Arrow revision for reproducible builds. - git clone --depth 1 https://github.com/apache/arrow.git && \
+ ARROW_TAG=apache-arrow-16.1.0 && \
+ git clone --branch ${ARROW_TAG} --depth 1 https://github.com/apache/arrow.git && \ 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @codrabbitai create issue for this, need to pin it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DCMAKE_INSTALL_PREFIX=/usr/local \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_PYTHON=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_PARQUET=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_ORC=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_FILESYSTEM=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_JSON=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_CSV=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_DATASET=ON \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_DEPENDENCY_SOURCE=BUNDLED \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_WITH_LZ4=OFF \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_WITH_ZSTD=OFF \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_WITH_SNAPPY=OFF \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_BUILD_TESTS=OFF \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-DARROW_BUILD_BENCHMARKS=OFF \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+104
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not disable core codecs (Snappy/Zstd/LZ4) in Arrow Disabling these breaks reading most real-world Parquet/Arrow datasets. - -DARROW_WITH_LZ4=OFF \
- -DARROW_WITH_ZSTD=OFF \
- -DARROW_WITH_SNAPPY=OFF \
+ -DARROW_WITH_LZ4=ON \
+ -DARROW_WITH_ZSTD=ON \
+ -DARROW_WITH_SNAPPY=ON \ With -DARROW_DEPENDENCY_SOURCE=BUNDLED, required codec libs will be built in-tree. 🤖 Prompt for AI Agents
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @coderabbitai sounds legit, create github issue There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainI'll create a GitHub issue for the Arrow codec configuration problem. @jiridanek Issue created! This addresses the Arrow codec configuration problem that would prevent users from reading most compressed Parquet datasets on s390x. The solution should be straightforward since the build already uses bundled dependencies. 🏁 Script executed:
Length of output: 2280 @jiridanek Issue #2305 created successfully! The issue comprehensively covers the Arrow codec configuration problem, including the impact on data compatibility and the straightforward solution to enable LZ4, Zstd, and Snappy codecs in the s390x pyarrow build. Link: #2305 ✏️ Learnings added
🧠 Learnings used
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.. && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
make -j$(nproc) VERBOSE=1 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
make install -j$(nproc) && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cd ../../python && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pip install --no-cache-dir -r requirements-build.txt && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_WITH_PARQUET=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_WITH_DATASET=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_WITH_FILESYSTEM=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_WITH_JSON=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_WITH_CSV=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PYARROW_PARALLEL=$(nproc) \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
python setup.py build_ext --build-type=release --bundle-arrow-cpp bdist_wheel && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /tmp/wheels && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cp dist/pyarrow-*.whl /tmp/wheels/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Ensure wheels directory exists and has content | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ls -la /tmp/wheels/; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Create empty wheels directory for non-s390x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mkdir -p /tmp/wheels; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
####################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# runtime-datascience # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
####################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FROM cpu-base AS runtime-datascience | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARG TARGETARCH | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ARG DATASCIENCE_SOURCE_CODE=runtimes/datascience/ubi9-python-3.12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LABEL name="odh-notebook-runtime-datascience-ubi9-python-3.12" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -54,17 +147,37 @@ LABEL name="odh-notebook-runtime-datascience-ubi9-python-3.12" \ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WORKDIR /opt/app-root/bin | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install Python packages from requirements.txt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
USER 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Copy wheels from build stage (s390x only) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
COPY --from=s390x-builder /tmp/wheels /tmp/wheels | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pip install --no-cache-dir /tmp/wheels/*.whl && rm -rf /tmp/wheels; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo "Skipping wheel install for $TARGETARCH"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Install Python packages from pylock.toml | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
COPY ${DATASCIENCE_SOURCE_CODE}/pylock.toml ./ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Copy Elyra dependencies for air-gapped enviroment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN echo "Installing softwares and packages" && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Fix permissions to support pip in Openshift environments \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
echo "Installing softwares and packages" && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if [ "$TARGETARCH" = "s390x" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# For s390x, we need special flags and environment variables for building packages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CFLAGS="-O3" CXXFLAGS="-O3" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
else \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+165
to
+176
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure Cargo is on PATH during s390x pip installs Profile scripts aren’t sourced in non-login shells; builds needing Rust (e.g., rpds-py) may fail. - GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
- CFLAGS="-O3" CXXFLAGS="-O3" \
- uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml; \
+ GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
+ CFLAGS="-O3" CXXFLAGS="-O3" \
+ PATH="/opt/.cargo/bin:$PATH" CARGO_HOME="/opt/.cargo" \
+ uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml; \ 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Fix permissions to support pip in Openshift environments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fix-permissions /opt/app-root -P | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
USER 1001 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WORKDIR /opt/app-root/src |
Uh oh!
There was an error while loading. Please reload this page.