|
62 | 62 | AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION:-3.10.18} |
63 | 63 | PYTHON_LTO=${PYTHON_LTO:-true} |
64 | 64 | GOLANG_MAJOR_MINOR_VERSION=${GOLANG_MAJOR_MINOR_VERSION:-1.24.4} |
| 65 | +RUSTUP_DEFAULT_TOOLCHAIN=${RUSTUP_DEFAULT_TOOLCHAIN:-stable} |
65 | 66 | COSIGN_VERSION=${COSIGN_VERSION:-3.0.5} |
66 | 67 |
|
67 | 68 | if [[ "${1}" == "runtime" ]]; then |
@@ -433,6 +434,14 @@ function install_golang() { |
433 | 434 | rm -rf /usr/local/go && tar -C /usr/local -xzf go"${GOLANG_MAJOR_MINOR_VERSION}".linux.tar.gz |
434 | 435 | } |
435 | 436 |
|
| 437 | +function install_rustup() { |
| 438 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ |
| 439 | + sh -s -- -y --default-toolchain "${RUSTUP_DEFAULT_TOOLCHAIN}" |
| 440 | + # Make rustup and cargo available system-wide |
| 441 | + mv /root/.cargo /usr/local/cargo |
| 442 | + mv /root/.rustup /usr/local/rustup |
| 443 | +} |
| 444 | + |
436 | 445 | function apt_clean() { |
437 | 446 | apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false |
438 | 447 | rm -rf /var/lib/apt/lists/* /var/log/* |
|
448 | 457 | install_debian_dev_dependencies |
449 | 458 | install_python |
450 | 459 | install_additional_dev_dependencies |
| 460 | + install_rustup |
451 | 461 | if [[ "${INSTALLATION_TYPE}" == "CI" ]]; then |
452 | 462 | install_golang |
453 | 463 | fi |
@@ -1628,6 +1638,9 @@ ENV DEV_APT_COMMAND=${DEV_APT_COMMAND} \ |
1628 | 1638 | ARG AIRFLOW_PYTHON_VERSION="3.12.13" |
1629 | 1639 | ENV AIRFLOW_PYTHON_VERSION=${AIRFLOW_PYTHON_VERSION} |
1630 | 1640 | ENV GOLANG_MAJOR_MINOR_VERSION="1.26.1" |
| 1641 | +ENV RUSTUP_HOME="/usr/local/rustup" |
| 1642 | +ENV CARGO_HOME="/usr/local/cargo" |
| 1643 | +ENV PATH="${CARGO_HOME}/bin:${PATH}" |
1631 | 1644 |
|
1632 | 1645 | ARG PYTHON_LTO |
1633 | 1646 |
|
@@ -1787,7 +1800,7 @@ ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} \ |
1787 | 1800 | AIRFLOW_PREK_VERSION=${AIRFLOW_PREK_VERSION} |
1788 | 1801 |
|
1789 | 1802 | # The PATH is needed for python to find installed and cargo to build the wheels |
1790 | | -ENV PATH="/usr/python/bin:/root/.local/bin:/root/.cargo/bin:${PATH}" |
| 1803 | +ENV PATH="/usr/python/bin:/root/.local/bin:${PATH}" |
1791 | 1804 | # Useful for creating a cache id based on the underlying architecture, preventing the use of cached python packages from |
1792 | 1805 | # an incorrect architecture. |
1793 | 1806 | ARG TARGETARCH |
|
0 commit comments