From 58a1678417cd67069c3488a45db2dd20e2935b3b Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Mon, 18 May 2026 08:02:54 +0300 Subject: [PATCH] [AZ-615] Dockerfile.jetson: fix pip indices + prerelease resolver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three discoveries from on-Jetson build (image builds clean in ~3m18s after fixes; gtsam-4.3a0, torch 2.4.0+cuda, cv2 4.11.0 all import OK inside container running --runtime=nvidia): 1. dustynv/l4t-pytorch's /etc/pip.conf bakes in a local Jetson mirror (jetson.webredirect.org) that's only reachable from the maintainer LAN. pip's DNS lookup fails everywhere else. Wipe the config and pin --index-url to upstream PyPI. 2. The image ships pip 24.2. The SUT's `gtsam<5.0,>=4.2` constraint matches ONLY gtsam-4.3a0 on PyPI (no stable aarch64 wheels), and pip 24.x rejects pre-releases unless --pre is set. The Colima image lands on the same wheel because its pip 26.x has explicit fallback-to-pre-release logic. Bump pip before installing the SUT to align resolver behavior across both harnesses. 3. Skip the [inference] extra entirely — the base image ships Tegra-tuned torch / torchvision that re-pip would clobber with x86 builds lacking cuDNN/cuBLAS for Orin. Co-authored-by: Cursor --- tests/e2e/Dockerfile.jetson | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Dockerfile.jetson b/tests/e2e/Dockerfile.jetson index 0ff0761..8175e52 100644 --- a/tests/e2e/Dockerfile.jetson +++ b/tests/e2e/Dockerfile.jetson @@ -85,7 +85,30 @@ COPY src ./src # would be to layer a venv on top of the pre-installed torch, but that # would shadow the Tegra-tuned torch wheel and break `.cuda()`. The image # IS the environment; embracing system-pip is the path of least drift. -RUN pip3 install --no-cache-dir --break-system-packages -e ".[dev]" +# +# The dustynv base bakes two stale indexes into /etc/pip.conf: +# * http://jetson.webredirect.org/jp6/cu126 — a local mirror only +# reachable from the maintainer's LAN; DNS-fails everywhere else. +# * https://pypi.ngc.nvidia.com — NVIDIA NGC; doesn't have most +# standard packages like setuptools>=68. +# Both are intended for installing Tegra-tuned PyTorch wheels, which +# we don't need to do — they're already in the base image. Wipe the +# bake'd config and pin to upstream PyPI for the dev extras only. +RUN rm -f /etc/pip.conf /root/.pip/pip.conf /root/.config/pip/pip.conf + +# Bump pip from 24.2 → latest. 24.2 rejects pre-release versions for +# specifiers like `gtsam<5.0,>=4.2` even when 4.3a0 is the only wheel +# PyPI ships for aarch64 (the Colima image lands on the same gtsam +# 4.3a0 because its pip 26.x has explicit "fallback to pre-release +# when no stable candidates match" logic). Keeping pip current also +# avoids future drift between the two harnesses. +RUN pip3 install --no-cache-dir --break-system-packages \ + --index-url https://pypi.org/simple \ + --upgrade pip + +RUN pip3 install --no-cache-dir --break-system-packages \ + --index-url https://pypi.org/simple \ + -e ".[dev]" # ENTRYPOINT mirrors the Colima Dockerfile — pytest discovers both # `tests/e2e/replay/` (heavy tier2 ACs run with GPS_DENIED_TIER=2) and