@@ -9,26 +9,19 @@ ENV MLFLOW_ENABLE_AI_GATEWAY=false
99RUN yarn install --silent \
1010 && NODE_OPTIONS="--max_old_space_size=4096" yarn build
1111
12- FROM registry.access.redhat.com/ubi9/python-311 @sha256:bb09d55bce99b839b0df565ab9e244cdc545037e612dad388569016137367cab AS python-builder
12+ FROM registry.access.redhat.com/ubi9/python-312:9.7 @sha256:bcdbab62d80f7dd88b4c2ce69a5cf8e9e1e367ac39b2e5d7f5d3f532d936ec80 AS python-builder
1313WORKDIR /src
1414USER 0
15- COPY --chown=1001:0 . .
16- RUN set -eux; \
17- python -m pip install --no-cache-dir build; \
18- cp pyproject.release.toml pyproject.toml; \
19- python -m build --wheel --outdir /tmp/dist libs/tracing; \
20- python -m build --wheel --outdir /tmp/dist libs/skinny; \
21- python -m build --wheel --outdir /tmp/dist; \
15+ COPY --chown=1001:0 kubernetes-workspace-provider/ kubernetes-workspace-provider/
16+ # Unset Cachi2 pip overrides (auto-injected by Konflux) so we can
17+ # fetch from the AIPCC Python package index.
18+ RUN unset PIP_NO_INDEX PIP_FIND_LINKS && \
19+ python -m pip install --no-cache-dir \
20+ --index-url https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4-EA1/cpu-ubi9-test/simple \
21+ build && \
2222 python -m build --wheel --outdir /tmp/dist kubernetes-workspace-provider
2323
24- FROM registry.access.redhat.com/ubi9/python-311@sha256:bb09d55bce99b839b0df565ab9e244cdc545037e612dad388569016137367cab
25- # Build cryptography from source against the system OpenSSL for FIPS compliance.
26- # The pip manylinux wheel bundles its own non-FIPS OpenSSL, so we must compile
27- # from source with OPENSSL_NO_VENDOR=1 to link against the system library.
28- RUN set -eux; \
29- dnf install -y --setopt=tsflags=nodocs openssl-devel cargo rust gcc python3.11-devel && \
30- OPENSSL_NO_VENDOR=1 python -m pip wheel --no-cache-dir --no-binary cryptography "cryptography>=43.0.0,<47" -w /tmp/dist && \
31- dnf clean all
24+ FROM registry.access.redhat.com/ubi9/python-312:9.7@sha256:bcdbab62d80f7dd88b4c2ce69a5cf8e9e1e367ac39b2e5d7f5d3f532d936ec80
3225ENV PYTHONDONTWRITEBYTECODE=1 \
3326 PYTHONUNBUFFERED=1 \
3427 MLFLOW_DISABLE_TELEMETRY=true \
@@ -39,26 +32,23 @@ WORKDIR /app
3932
4033USER 0
4134COPY --from=python-builder /tmp/dist/ /tmp/dist/
35+ COPY requirements/konflux.txt /tmp/konflux.txt
36+ COPY requirements/konflux-extra.txt /tmp/konflux-extra.txt
37+ # Unset Cachi2 pip overrides (auto-injected by Konflux) so we can
38+ # fetch from the AIPCC Python package index first, then re-source
39+ # cachi2.env for the hermetically prefetched extra packages.
4240RUN set -eux; \
43- dnf install -y --setopt=tsflags=nodocs postgresql-devel gcc python3.11-devel && \
44- python -m pip install --no-cache-dir /tmp/dist/mlflow*.whl && \
45- python -m pip install --no-cache-dir --force-reinstall /tmp/dist/cryptography-*.whl && \
46- python -m pip install --no-cache-dir boto3 psycopg2 prometheus-flask-exporter && \
41+ dnf install -y --setopt=tsflags=nodocs postgresql-devel gcc python3.12-devel openblas-threads && \
42+ unset PIP_NO_INDEX PIP_FIND_LINKS && \
43+ python -m pip install --no-cache-dir \
44+ --index-url https://console.redhat.com/api/pypi/public-rhai/rhoai/3.4-EA1/cpu-ubi9-test/simple \
45+ setuptools -r /tmp/konflux.txt && \
46+ if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
47+ python -m pip install --no-cache-dir --no-deps --no-build-isolation --require-hashes \
48+ -r /tmp/konflux-extra.txt && \
49+ python -m pip install --no-cache-dir --no-deps /tmp/dist/mlflow_kubernetes_workspace_provider-*.whl && \
4750 dnf clean all && \
48- rm -rf /tmp/dist
49-
50- # FIPS compliance: verify the cryptography package uses the system OpenSSL
51- # rather than a bundled copy. The system OpenSSL on UBI 9 is FIPS-validated
52- # and will operate in FIPS mode when the host kernel has FIPS enabled.
53- RUN set -eux; \
54- sys_openssl=$(openssl version | awk '{print $1, $2, $3, $4, $5}'); \
55- py_openssl=$(python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())"); \
56- echo "System OpenSSL: ${sys_openssl}"; \
57- echo "cryptography OpenSSL: ${py_openssl}"; \
58- [ "${sys_openssl}" = "${py_openssl}" ] || { \
59- echo "FIPS ERROR: cryptography is not using the system OpenSSL"; \
60- exit 1; \
61- }
51+ rm -rf /tmp/dist /tmp/konflux.txt /tmp/konflux-extra.txt
6252
6353# Copy built UI from builder stage
6454COPY --from=ui-builder /opt/app-root/src/build /tmp/mlflow-ui-build
0 commit comments