@@ -31,9 +31,7 @@ ARG TARGETARCH
3131ARG STACKABLE_USER_UID
3232ARG S3FS
3333ARG CYCLONEDX_BOM
34-
35- COPY airflow/constraints-${PRODUCT}-python${PYTHON}.txt /tmp/constraints.txt
36- COPY --from=opa-auth-manager-builder /tmp/opa-auth-manager/dist/opa_auth_manager-0.1.0-py3-none-any.whl /tmp/
34+ ARG UV
3735
3836# The mysql provider is currently excluded.
3937# Requires implementation of https://github.com/apache/airflow/blob/2.2.5/scripts/docker/install_mysql.sh
@@ -62,19 +60,27 @@ RUN microdnf update && \
6260 microdnf clean all && \
6361 rm -rf /var/cache/yum
6462
63+ COPY airflow/stackable/constraints/${PRODUCT}/constraints-python${PYTHON}.txt /tmp/constraints.txt
64+ COPY airflow/stackable/constraints/${PRODUCT}/build-constraints-python${PYTHON}.txt /tmp/build-constraints.txt
65+ COPY --from=opa-auth-manager-builder /tmp/opa-auth-manager/dist/opa_auth_manager-0.1.0-py3-none-any.whl /tmp/
66+
6567RUN <<EOF
6668python${PYTHON} -m venv --system-site-packages /stackable/app
6769
6870source /stackable/app/bin/activate
6971
72+ # Upgrade pip to the latest version
73+ # Also install uv to get support for build constraints
7074pip install --no-cache-dir --upgrade pip
71- pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt
75+ pip install --no-cache-dir uv==${UV}
76+
77+ uv pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt --build-constraints /tmp/build-constraints.txt
7278# Needed for pandas S3 integration to e.g. write and read csv and parquet files to/from S3
73- pip install --no-cache-dir s3fs==${S3FS} cyclonedx-bom==${CYCLONEDX_BOM}
79+ uv pip install --no-cache-dir s3fs==${S3FS} cyclonedx-bom==${CYCLONEDX_BOM}
7480# Needed for OIDC
75- pip install --no-cache-dir Flask_OIDC==2.2.0 Flask-OpenID==1.3.1
81+ uv pip install --no-cache-dir Flask_OIDC==2.2.0 Flask-OpenID==1.3.1
7682
77- pip install --no-cache-dir /tmp/opa_auth_manager-0.1.0-py3-none-any.whl
83+ uv pip install --no-cache-dir /tmp/opa_auth_manager-0.1.0-py3-none-any.whl
7884
7985# Create the SBOM for Airflow
8086# Important: All `pip install` commands must be above this line, otherwise the SBOM will be incomplete
0 commit comments