From a7aecfb9fb18c329969bf178c6ac638cd3e7dfba Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Tue, 18 Aug 2026 13:48:21 -0700 Subject: [PATCH] build(container): bake optional requirements into px4-dev image The Dockerfile only ever copied requirements.txt, so optional-requirements.txt was never installed into the image even though it sits in the build context. Every CI job needing pyelftools therefore fetched it from PyPI at job time and failed whenever files.pythonhosted.org returned 502s. symforce publishes no Linux aarch64 wheel and no sdist, so installing the file unguarded would break the linux/arm64 image build. Gate it with an environment marker so aarch64 installs pyelftools only. Assisted-by: Claude:claude-opus-5 Signed-off-by: Ramon Roche --- .github/workflows/dev_container.yml | 1 + Tools/setup/Dockerfile | 6 ++++++ Tools/setup/optional-requirements.txt | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev_container.yml b/.github/workflows/dev_container.yml index 715ddd3930a..f99e3a1af52 100644 --- a/.github/workflows/dev_container.yml +++ b/.github/workflows/dev_container.yml @@ -13,6 +13,7 @@ on: - '.github/workflows/dev_container.yml' - 'Tools/setup/ubuntu.sh' - 'Tools/setup/requirements.txt' + - 'Tools/setup/optional-requirements.txt' - 'Tools/setup/Dockerfile' - 'Tools/setup/docker-entrypoint.sh' workflow_dispatch: diff --git a/Tools/setup/Dockerfile b/Tools/setup/Dockerfile index 1b884157cfc..6d07b492c01 100644 --- a/Tools/setup/Dockerfile +++ b/Tools/setup/Dockerfile @@ -23,6 +23,12 @@ COPY ubuntu.sh /tmp/ubuntu.sh RUN bash /tmp/ubuntu.sh --no-sim-tools +# Install the optional tooling requirements as well, so CI jobs that need them +# (itcm_check) don't have to reach out to PyPI on every run. +COPY optional-requirements.txt /tmp/optional-requirements.txt + +RUN python3 -m pip install --break-system-packages -r /tmp/optional-requirements.txt + # Make sure git is ok with your local copy RUN git config --global --add safe.directory '*' diff --git a/Tools/setup/optional-requirements.txt b/Tools/setup/optional-requirements.txt index 57c243a2378..eadfa6ebb28 100644 --- a/Tools/setup/optional-requirements.txt +++ b/Tools/setup/optional-requirements.txt @@ -1,2 +1,4 @@ pyelftools>=0.32,<1 -symforce>=0.9.0 +# symforce publishes no Linux aarch64 wheel and no sdist, so it cannot be +# installed there. Skip it on that platform instead of failing the install. +symforce>=0.9.0; sys_platform != "linux" or platform_machine != "aarch64"