@@ -41,9 +41,7 @@ ARG AUTHLIB
4141ARG TARGETARCH
4242ARG TARGETOS
4343ARG CYCLONEDX_BOM
44-
45- COPY superset/constraints-${PRODUCT}.txt /tmp/constraints.txt
46- COPY --from=opa-authorizer-builder /tmp/opa-authorizer/dist/opa_authorizer-0.1.0-py3-none-any.whl /tmp/
44+ ARG UV
4745
4846RUN microdnf update \
4947 && microdnf install \
@@ -68,6 +66,12 @@ RUN microdnf update \
6866 && microdnf clean all && \
6967 rm -rf /var/cache/yum
7068
69+ COPY superset/stackable/constraints/${PRODUCT}/constraints.txt /tmp/constraints.txt
70+ COPY superset/stackable/constraints/${PRODUCT}/build-constraints.txt /tmp/build-constraints.txt
71+ COPY --from=opa-authorizer-builder /tmp/opa-authorizer/dist/opa_authorizer-0.1.0-py3-none-any.whl /tmp/
72+
73+ # Upgrade pip to the latest version
74+ # Also install uv to get support for build constraints
7175# DL3042 false-positive, --no-chache-dir is specified a few lines below.
7276# See https://github.com/hadolint/hadolint/issues/1042.
7377# hadolint ignore=DL3042
@@ -78,10 +82,12 @@ RUN python3 -m venv /stackable/app \
7882 --upgrade \
7983 setuptools==75.2.0 \
8084 pip \
81- && pip install \
85+ uv==${UV} \
86+ && uv pip install \
8287 --no-cache-dir \
8388 --upgrade \
84- --constraint /tmp/constraints.txt \
89+ --constraints /tmp/constraints.txt \
90+ --build-constraints /tmp/build-constraints.txt \
8591 apache-superset==${PRODUCT} \
8692 gevent \
8793 psycopg2-binary \
@@ -104,15 +110,15 @@ RUN python3 -m venv /stackable/app \
104110 # We only want to bump this for the 4.0.x line, as the others already have updated and we don't want to accidentially downgrade the version
105111 && if [[ "$PRODUCT" =~ ^4\. 0\. .* ]]; \
106112 then echo "Superset 4.0.x detected, installing gunicorn 22.0.0 to fix CVE-2024-1135" \
107- && pip install gunicorn==22.0.0; \
113+ && uv pip install gunicorn==22.0.0; \
108114 fi \
109- && pip install \
115+ && uv pip install \
110116 --no-cache-dir \
111117 --upgrade \
112118 python-json-logger \
113119 cyclonedx-bom==${CYCLONEDX_BOM} \
114120 && if [ -n "$AUTHLIB" ]; then pip install Authlib==${AUTHLIB}; fi && \
115- pip install --no-cache-dir /tmp/opa_authorizer-0.1.0-py3-none-any.whl
121+ uv pip install --no-cache-dir /tmp/opa_authorizer-0.1.0-py3-none-any.whl
116122
117123COPY --from=statsd_exporter-builder /statsd_exporter/statsd_exporter /stackable/statsd_exporter
118124
0 commit comments