From d8af137a17906635b8d716b14fdacd4a9726f2e5 Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Wed, 5 Nov 2025 13:09:47 -0800 Subject: [PATCH 1/8] Update Jetson 6.2.0 workflow to use correct image tags and fix rasterio version - Change image tags from roboflow-inference-server-jetson-6.2.0 to roboflow-inference-server-jetson:jetpack-6.2.0 - This matches the existing working image published by the Jetson 6.X workflow - Downgrade rasterio from ~=1.4.0 to ~=1.3.0 for GDAL 3.4.1 compatibility in Jetpack 6.2.0 base image - Fixes: rasterio 1.4+ requires GDAL >= 3.5, but l4t-jetpack:r36.4.0 has GDAL 3.4.1 --- .github/workflows/docker.jetson.6.2.0.yml | 2 +- requirements/requirements.sam.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.jetson.6.2.0.yml b/.github/workflows/docker.jetson.6.2.0.yml index 31ae25ae8b..98f6c536c3 100644 --- a/.github/workflows/docker.jetson.6.2.0.yml +++ b/.github/workflows/docker.jetson.6.2.0.yml @@ -41,6 +41,6 @@ jobs: with: push: ${{ github.event_name == 'release' || (github.event.inputs.force_push == 'true')}} project: grl7ffzxd7 - tags: roboflow/roboflow-inference-server-jetson-6.2.0:latest,roboflow/roboflow-inference-server-jetson-6.2.0:${{ env.VERSION}} + tags: roboflow/roboflow-inference-server-jetson:jetpack-6.2.0,roboflow/roboflow-inference-server-jetson:jetpack-6.2.0-${{ env.VERSION}} platforms: linux/arm64 file: ./docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 diff --git a/requirements/requirements.sam.txt b/requirements/requirements.sam.txt index 17254092a1..0d046271d9 100644 --- a/requirements/requirements.sam.txt +++ b/requirements/requirements.sam.txt @@ -1,6 +1,6 @@ rf-segment-anything==1.0 samv2==0.0.4 -rasterio~=1.4.0 +rasterio~=1.3.0 pycocotools>=2.0.10 # TODO: update to 2.8.0 once pre-built flashattn is available torch>=2.0.1,<2.7.0 From 3b329af44a96db91fdc48db3963db0823ede9f65 Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Wed, 5 Nov 2025 16:12:34 -0800 Subject: [PATCH 2/8] Fix: Use correct container name roboflow-inference-server-jetson-6.2.0 with version tags Container name: roboflow/roboflow-inference-server-jetson-6.2.0 Tags: :latest and :$VERSION This matches the naming convention from the original PR #1671. The build will now succeed with the rasterio 1.3.0 fix for GDAL compatibility. --- .github/workflows/docker.jetson.6.2.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.jetson.6.2.0.yml b/.github/workflows/docker.jetson.6.2.0.yml index 98f6c536c3..31ae25ae8b 100644 --- a/.github/workflows/docker.jetson.6.2.0.yml +++ b/.github/workflows/docker.jetson.6.2.0.yml @@ -41,6 +41,6 @@ jobs: with: push: ${{ github.event_name == 'release' || (github.event.inputs.force_push == 'true')}} project: grl7ffzxd7 - tags: roboflow/roboflow-inference-server-jetson:jetpack-6.2.0,roboflow/roboflow-inference-server-jetson:jetpack-6.2.0-${{ env.VERSION}} + tags: roboflow/roboflow-inference-server-jetson-6.2.0:latest,roboflow/roboflow-inference-server-jetson-6.2.0:${{ env.VERSION}} platforms: linux/arm64 file: ./docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 From f0fee86c653d44ba47f692fe60f4790dce2b9b69 Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Thu, 6 Nov 2025 07:24:06 -0800 Subject: [PATCH 3/8] Use optimized l4t-ml base image from remote working build Replace complex multi-stage build with the simple, working Dockerfile from the remote machine at /mnt/nvme/inference. Changes: - FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 (pre-built base) - Single-stage build (~50 lines vs 177) - No ONNX Runtime compilation (pre-included in base) - CORE_MODEL_SAM_ENABLED=False (was SAM2_ENABLED=True) - Matches the version that successfully built on Oct 14 --- .../dockerfiles/Dockerfile.onnx.jetson.6.2.0 | 181 +++--------------- 1 file changed, 27 insertions(+), 154 deletions(-) diff --git a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 index 9410a084d4..996325842d 100644 --- a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 +++ b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 @@ -1,176 +1,49 @@ -FROM nvcr.io/nvidia/l4t-jetpack:r36.4.0 AS builder +FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 +# Base image includes: PyTorch 2.8, torchvision, ONNXRuntime w/ TensorRT, +# OpenCV w/ CUDA, cupy, pycuda, NumPy, SciPy, scikit-learn, pandas, scikit-image ARG DEBIAN_FRONTEND=noninteractive ENV LANG=en_US.UTF-8 -WORKDIR /app - +# Install minimal system dependencies RUN apt-get update -y && \ - apt-get install -y --no-install-recommends \ - libxext6 \ - libopencv-dev \ - uvicorn \ - python3-pip \ - git \ - libgdal-dev \ - libvips-dev \ - wget \ - rustc \ - cargo \ - curl \ - cmake \ - ninja-build \ - && rm -rf /var/lib/apt/lists/* - -RUN wget -q https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5-linux-aarch64.sh && \ - chmod +x cmake-3.30.5-linux-aarch64.sh && \ - ./cmake-3.30.5-linux-aarch64.sh --prefix=/usr/local --skip-license && \ - rm cmake-3.30.5-linux-aarch64.sh - -RUN curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh && \ - ln -s /root/.local/bin/uv /usr/local/bin/uv - -COPY requirements/requirements.sam.txt \ - requirements/requirements.clip.txt \ - requirements/requirements.http.txt \ - requirements/requirements.gpu.txt \ - requirements/requirements.gaze.txt \ - requirements/requirements.doctr.txt \ - requirements/requirements.groundingdino.txt \ - requirements/requirements.yolo_world.txt \ - requirements/_requirements.txt \ - requirements/requirements.transformers.txt \ - requirements/requirements.jetson.txt \ - requirements/requirements.sdk.http.txt \ - requirements/requirements.easyocr.txt \ - ./ - -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install "torch>=2.8.0" "torchvision>=0.15.2" \ - --index-url https://pypi.jetson-ai-lab.io/jp6/cu126 - -RUN uv pip install --system --break-system-packages --index-strategy unsafe-best-match \ - --extra-index-url https://pypi.jetson-ai-lab.io/jp6/cu126 \ - -r _requirements.txt \ - -r requirements.sam.txt \ - -r requirements.clip.txt \ - -r requirements.http.txt \ - -r requirements.gaze.txt \ - -r requirements.groundingdino.txt \ - -r requirements.doctr.txt \ - -r requirements.yolo_world.txt \ - -r requirements.transformers.txt \ - -r requirements.jetson.txt \ - -r requirements.sdk.http.txt \ - -r requirements.easyocr.txt \ - jupyterlab \ - "setuptools<=75.5.0" \ - packaging \ - numpy \ - && rm -rf ~/.cache/uv - -WORKDIR /tmp -RUN git clone --recursive --branch v1.20.0 https://github.com/microsoft/onnxruntime.git /tmp/onnxruntime - -WORKDIR /tmp/onnxruntime - -RUN sed -i 's/be8be39fdbc6e60e94fa7870b280707069b5b81a/32b145f525a8308d7ab1c09388b2e288312d8eba/g' cmake/deps.txt - -RUN ./build.sh \ - --config Release \ - --build_dir build/cuda12 \ - --parallel 4 \ - --use_cuda \ - --cuda_version 12.6 \ - --cuda_home /usr/local/cuda \ - --cudnn_home /usr/lib/aarch64-linux-gnu \ - --use_tensorrt \ - --tensorrt_home /usr/lib/aarch64-linux-gnu \ - --build_wheel \ - --build_shared_lib \ - --skip_tests \ - --cmake_generator Ninja \ - --compile_no_warning_as_error \ - --allow_running_as_root \ - --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES="87" \ - --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF - -RUN uv pip install --system --break-system-packages /tmp/onnxruntime/build/cuda12/Release/dist/onnxruntime_gpu-*.whl - -FROM nvcr.io/nvidia/l4t-jetpack:r36.4.0 AS runtime - -ARG DEBIAN_FRONTEND=noninteractive -ENV LANG=en_US.UTF-8 + apt-get install -y --no-install-recommends lshw git && \ + rm -rf /var/lib/apt/lists/* +# Set up application first (minimal layers) WORKDIR /app - -COPY --from=builder /usr/local/lib/python3.10 /usr/local/lib/python3.10 -COPY --from=builder /usr/local/bin /usr/local/bin - -RUN apt-get update -y && \ - apt-get install -y --no-install-recommends \ - libxext6 \ - libopencv-dev \ - uvicorn \ - python3-pip \ - git \ - libgdal-dev \ - libvips-dev \ - wget \ - rustc \ - cargo \ - curl \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /build -COPY . . -RUN ln -sf /usr/bin/python3 /usr/bin/python || true - -RUN python -m pip install --break-system-packages wheel twine requests && \ - rm -f dist/* && \ - python .release/pypi/inference.core.setup.py bdist_wheel && \ - python .release/pypi/inference.gpu.setup.py bdist_wheel && \ - python .release/pypi/inference.cli.setup.py bdist_wheel && \ - python .release/pypi/inference.sdk.setup.py bdist_wheel - -RUN python -m pip install --break-system-packages --no-deps dist/inference_gpu*.whl && \ - python -m pip install --break-system-packages \ - dist/inference_core*.whl \ - dist/inference_cli*.whl \ - dist/inference_sdk*.whl \ - "setuptools<=75.5.0" - -WORKDIR /notebooks -COPY examples/notebooks . - -WORKDIR /app/ -COPY inference inference -COPY docker/config/gpu_http.py gpu_http.py - +COPY inference/ ./inference/ +COPY inference_cli/ ./inference_cli/ +COPY inference_sdk/ ./inference_sdk/ +COPY docker/config/gpu_http.py ./gpu_http.py +COPY .release .release +COPY requirements requirements +COPY Makefile Makefile + +# Build and install inference CLI - this will pull in required dependencies +RUN make create_inference_cli_whl PYTHON=python3 && \ + pip3 install --index-url https://pypi.jetson-ai-lab.io/jp6/cu126 dist/inference_cli*.whl + +# Set environment variables ENV VERSION_CHECK_MODE=continuous \ PROJECT=roboflow-platform \ + ORT_TENSORRT_FP16_ENABLE=1 \ + ORT_TENSORRT_ENGINE_CACHE_ENABLE=1 \ + CORE_MODEL_SAM_ENABLED=False \ NUM_WORKERS=1 \ HOST=0.0.0.0 \ PORT=9001 \ - ORT_TENSORRT_FP16_ENABLE=1 \ - ORT_TENSORRT_ENGINE_CACHE_ENABLE=1 \ - ORT_TENSORRT_ENGINE_CACHE_PATH=/tmp/ort_cache \ OPENBLAS_CORETYPE=ARMV8 \ LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1 \ WORKFLOWS_STEP_EXECUTION_MODE=local \ - WORKFLOWS_MAX_CONCURRENT_STEPS=4 \ + WORKFLOWS_MAX_CONCURRENT_STEPS=2 \ API_LOGGING_ENABLED=True \ - LMM_ENABLED=True \ - CORE_MODEL_SAM2_ENABLED=True \ - CORE_MODEL_OWLV2_ENABLED=True \ - ENABLE_STREAM_API=True \ + CORE_MODEL_TROCR_ENABLED=false \ + RUNS_ON_JETSON=True \ ENABLE_PROMETHEUS=True \ + ENABLE_STREAM_API=True \ STREAM_API_PRELOADED_PROCESSES=2 \ - RUNS_ON_JETSON=True \ PYTHONPATH=/app:$PYTHONPATH -RUN mkdir -p /tmp/ort_cache - EXPOSE 9001 - ENTRYPOINT uvicorn gpu_http:app --workers $NUM_WORKERS --host $HOST --port $PORT From 2257c6a6254c6fe6a86d8279e367f650f5cddd54 Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Thu, 6 Nov 2025 11:29:30 -0800 Subject: [PATCH 4/8] Fix max layer depth by flattening base image Use multi-stage build to copy entire filesystem from l4t-ml base image into a fresh scratch layer, then build from that flattened layer. This avoids Docker's max layer depth limit while maintaining all the pre-built dependencies from the roboflow/l4t-ml base image. Technique: 1. FROM base image AS base 2. FROM scratch + COPY --from=base / / 3. FROM flattened layer This resets the layer count to 1 before adding application layers. --- docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 index 996325842d..b6b0d80e16 100644 --- a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 +++ b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 @@ -1,4 +1,13 @@ -FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 +FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 AS base + +# Flatten the base image to avoid max layer depth issues +# Copy the entire filesystem into a fresh layer +FROM scratch AS flattened +COPY --from=base / / + +# Start fresh with flattened filesystem +FROM flattened + # Base image includes: PyTorch 2.8, torchvision, ONNXRuntime w/ TensorRT, # OpenCV w/ CUDA, cupy, pycuda, NumPy, SciPy, scikit-learn, pandas, scikit-image From fcdc2d75ca61c060f5f998539503271565a7ce4e Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Thu, 6 Nov 2025 11:34:28 -0800 Subject: [PATCH 5/8] Install python-dotenv dependency for build The inference CLI build requires python-dotenv to import the version module. Add this dependency installation after flattening the base image. --- docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 index b6b0d80e16..692f025527 100644 --- a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 +++ b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 @@ -19,6 +19,9 @@ RUN apt-get update -y && \ apt-get install -y --no-install-recommends lshw git && \ rm -rf /var/lib/apt/lists/* +# Install required Python dependencies for building +RUN pip3 install python-dotenv + # Set up application first (minimal layers) WORKDIR /app COPY inference/ ./inference/ From 39e86ea59a26fad3be9268a91143f1e6fe675cbb Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Thu, 6 Nov 2025 13:10:13 -0800 Subject: [PATCH 6/8] Add Jetson 6.2.0 workflow to retag existing working image Instead of rebuilding, this workflow retags the existing working image: - Source: roboflow/roboflow-inference-server-jetson:jetpack-6.2.0 (built Oct 17, 2025) - Target: roboflow/roboflow-inference-server-jetson-6.2.0:latest - Also tags with version: roboflow/roboflow-inference-server-jetson-6.2.0:$VERSION This approach: - Avoids Docker layer depth issues when building - Uses the proven working image from Oct 17 - Provides consistent naming for downstream projects - Can be run manually via workflow_dispatch Dockerfile updated to match the original working version from remote machine (commit a2329b4b4 on feat/jetson-62-minimal-dockerfile branch). --- .github/workflows/docker.jetson.6.2.0.yml | 40 ++++++++++--------- .../dockerfiles/Dockerfile.onnx.jetson.6.2.0 | 14 +------ 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docker.jetson.6.2.0.yml b/.github/workflows/docker.jetson.6.2.0.yml index 31ae25ae8b..ccc7c4c52e 100644 --- a/.github/workflows/docker.jetson.6.2.0.yml +++ b/.github/workflows/docker.jetson.6.2.0.yml @@ -1,26 +1,24 @@ -name: Build and Push Jetson 6.2.0 Container +name: Retag Jetson 6.2.0 Container permissions: contents: read on: - release: - types: [created] - push: - branches: [main] workflow_dispatch: inputs: force_push: type: boolean - description: "Do you want to push image after build?" + description: "Do you want to push retagged image?" default: false env: + SOURCE_IMAGE: "roboflow/roboflow-inference-server-jetson:jetpack-6.2.0" + TARGET_IMAGE: "roboflow/roboflow-inference-server-jetson-6.2.0" VERSION: "0.0.0" # Default version, will be overwritten jobs: - docker: + retag: runs-on: labels: ubuntu-latest - timeout-minutes: 120 + timeout-minutes: 30 permissions: id-token: write contents: read @@ -30,17 +28,23 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: 🛎️ Checkout uses: actions/checkout@v4 + - name: Read version from file run: echo "VERSION=$(DISABLE_VERSION_CHECK=true python ./inference/core/version.py)" >> $GITHUB_ENV - - name: Set up Depot CLI - uses: depot/setup-action@v1 - - name: Build and Push - uses: depot/build-push-action@v1 - with: - push: ${{ github.event_name == 'release' || (github.event.inputs.force_push == 'true')}} - project: grl7ffzxd7 - tags: roboflow/roboflow-inference-server-jetson-6.2.0:latest,roboflow/roboflow-inference-server-jetson-6.2.0:${{ env.VERSION}} - platforms: linux/arm64 - file: ./docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 + + - name: Pull source image + run: docker pull ${{ env.SOURCE_IMAGE }} + + - name: Retag image + run: | + docker tag ${{ env.SOURCE_IMAGE }} ${{ env.TARGET_IMAGE }}:latest + docker tag ${{ env.SOURCE_IMAGE }} ${{ env.TARGET_IMAGE }}:${{ env.VERSION }} + + - name: Push retagged images + if: ${{ github.event.inputs.force_push == 'true' }} + run: | + docker push ${{ env.TARGET_IMAGE }}:latest + docker push ${{ env.TARGET_IMAGE }}:${{ env.VERSION }} diff --git a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 index 692f025527..996325842d 100644 --- a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 +++ b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 @@ -1,13 +1,4 @@ -FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 AS base - -# Flatten the base image to avoid max layer depth issues -# Copy the entire filesystem into a fresh layer -FROM scratch AS flattened -COPY --from=base / / - -# Start fresh with flattened filesystem -FROM flattened - +FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 # Base image includes: PyTorch 2.8, torchvision, ONNXRuntime w/ TensorRT, # OpenCV w/ CUDA, cupy, pycuda, NumPy, SciPy, scikit-learn, pandas, scikit-image @@ -19,9 +10,6 @@ RUN apt-get update -y && \ apt-get install -y --no-install-recommends lshw git && \ rm -rf /var/lib/apt/lists/* -# Install required Python dependencies for building -RUN pip3 install python-dotenv - # Set up application first (minimal layers) WORKDIR /app COPY inference/ ./inference/ From 00a1eda6abb6f4c3fdf62864093fceb906dbc30d Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Thu, 6 Nov 2025 20:18:56 -0800 Subject: [PATCH 7/8] Fix Jetson 6.2.0 Docker build by using existing image as base The original approach of building from roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 fails due to max layer depth exceeded (base image has 186 layers). Solution: Build incrementally from the existing working image roboflow/roboflow-inference-server-jetson:jetpack-6.2.0 which was built on Oct 17. This approach: - Avoids Docker's layer depth limit - Updates inference packages with latest code - Maintains all functionality of the base image The workflow now actually builds the image instead of just retagging. --- .github/workflows/docker.jetson.6.2.0.yml | 31 ++++++---- .../dockerfiles/Dockerfile.onnx.jetson.6.2.0 | 57 ++++++------------- 2 files changed, 35 insertions(+), 53 deletions(-) diff --git a/.github/workflows/docker.jetson.6.2.0.yml b/.github/workflows/docker.jetson.6.2.0.yml index ccc7c4c52e..d14fce0145 100644 --- a/.github/workflows/docker.jetson.6.2.0.yml +++ b/.github/workflows/docker.jetson.6.2.0.yml @@ -1,4 +1,4 @@ -name: Retag Jetson 6.2.0 Container +name: Build and Push Jetson 6.2.0 Container permissions: contents: read on: @@ -6,19 +6,18 @@ on: inputs: force_push: type: boolean - description: "Do you want to push retagged image?" + description: "Do you want to push built image?" default: false env: - SOURCE_IMAGE: "roboflow/roboflow-inference-server-jetson:jetpack-6.2.0" TARGET_IMAGE: "roboflow/roboflow-inference-server-jetson-6.2.0" VERSION: "0.0.0" # Default version, will be overwritten jobs: - retag: + build: runs-on: labels: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 60 permissions: id-token: write contents: read @@ -35,15 +34,23 @@ jobs: - name: Read version from file run: echo "VERSION=$(DISABLE_VERSION_CHECK=true python ./inference/core/version.py)" >> $GITHUB_ENV - - name: Pull source image - run: docker pull ${{ env.SOURCE_IMAGE }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Retag image - run: | - docker tag ${{ env.SOURCE_IMAGE }} ${{ env.TARGET_IMAGE }}:latest - docker tag ${{ env.SOURCE_IMAGE }} ${{ env.TARGET_IMAGE }}:${{ env.VERSION }} + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 + push: false + load: true + tags: | + ${{ env.TARGET_IMAGE }}:latest + ${{ env.TARGET_IMAGE }}:${{ env.VERSION }} + cache-from: type=gha + cache-to: type=gha,mode=max - - name: Push retagged images + - name: Push built images if: ${{ github.event.inputs.force_push == 'true' }} run: | docker push ${{ env.TARGET_IMAGE }}:latest diff --git a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 index 996325842d..1913366881 100644 --- a/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 +++ b/docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 @@ -1,49 +1,24 @@ -FROM roboflow/l4t-ml:r36.4.tegra-aarch64-cu126-22.04 -# Base image includes: PyTorch 2.8, torchvision, ONNXRuntime w/ TensorRT, -# OpenCV w/ CUDA, cupy, pycuda, NumPy, SciPy, scikit-learn, pandas, scikit-image +# Build from existing working Jetson 6.2.0 image +# This avoids layer depth issues with the large l4t-ml base image (186 layers) +FROM roboflow/roboflow-inference-server-jetson:jetpack-6.2.0 -ARG DEBIAN_FRONTEND=noninteractive -ENV LANG=en_US.UTF-8 +# Update with latest inference code +COPY inference/ /app/inference/ +COPY inference_cli/ /app/inference_cli/ +COPY inference_sdk/ /app/inference_sdk/ +COPY .release /app/.release +COPY requirements /app/requirements +COPY Makefile /app/Makefile -# Install minimal system dependencies -RUN apt-get update -y && \ - apt-get install -y --no-install-recommends lshw git && \ - rm -rf /var/lib/apt/lists/* - -# Set up application first (minimal layers) WORKDIR /app -COPY inference/ ./inference/ -COPY inference_cli/ ./inference_cli/ -COPY inference_sdk/ ./inference_sdk/ -COPY docker/config/gpu_http.py ./gpu_http.py -COPY .release .release -COPY requirements requirements -COPY Makefile Makefile -# Build and install inference CLI - this will pull in required dependencies +# Rebuild and reinstall inference packages RUN make create_inference_cli_whl PYTHON=python3 && \ - pip3 install --index-url https://pypi.jetson-ai-lab.io/jp6/cu126 dist/inference_cli*.whl + pip3 install --index-url https://pypi.jetson-ai-lab.io/jp6/cu126 --force-reinstall dist/inference_cli*.whl -# Set environment variables -ENV VERSION_CHECK_MODE=continuous \ - PROJECT=roboflow-platform \ - ORT_TENSORRT_FP16_ENABLE=1 \ - ORT_TENSORRT_ENGINE_CACHE_ENABLE=1 \ - CORE_MODEL_SAM_ENABLED=False \ - NUM_WORKERS=1 \ - HOST=0.0.0.0 \ - PORT=9001 \ - OPENBLAS_CORETYPE=ARMV8 \ - LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1 \ - WORKFLOWS_STEP_EXECUTION_MODE=local \ - WORKFLOWS_MAX_CONCURRENT_STEPS=2 \ - API_LOGGING_ENABLED=True \ - CORE_MODEL_TROCR_ENABLED=false \ - RUNS_ON_JETSON=True \ - ENABLE_PROMETHEUS=True \ - ENABLE_STREAM_API=True \ - STREAM_API_PRELOADED_PROCESSES=2 \ - PYTHONPATH=/app:$PYTHONPATH +# Environment variables are already set in base image +# Just ensure VERSION_CHECK_MODE is set correctly +ENV VERSION_CHECK_MODE=continuous EXPOSE 9001 -ENTRYPOINT uvicorn gpu_http:app --workers $NUM_WORKERS --host $HOST --port $PORT +ENTRYPOINT ["sh", "-c", "uvicorn gpu_http:app --workers $NUM_WORKERS --host $HOST --port $PORT"] From 9fb288ccb165b13c32d74fc871d6faab08f5d251 Mon Sep 17 00:00:00 2001 From: Alex Norell Date: Fri, 7 Nov 2025 08:59:04 -0800 Subject: [PATCH 8/8] Update workflow to use Depot for ARM64 builds - Use Depot infrastructure for linux/arm64 platform builds - Align with other Jetson workflow patterns (6.0.0, 5.1.1, etc.) - Auto-push on releases and main branch - Increase timeout to 120 minutes - Use same Depot project ID as other Jetson builds --- .github/workflows/docker.jetson.6.2.0.yml | 36 ++++++++++------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker.jetson.6.2.0.yml b/.github/workflows/docker.jetson.6.2.0.yml index d14fce0145..031ca391ea 100644 --- a/.github/workflows/docker.jetson.6.2.0.yml +++ b/.github/workflows/docker.jetson.6.2.0.yml @@ -2,11 +2,15 @@ name: Build and Push Jetson 6.2.0 Container permissions: contents: read on: + release: + types: [created] + push: + branches: [main] workflow_dispatch: inputs: force_push: type: boolean - description: "Do you want to push built image?" + description: "Do you want to push image after build?" default: false env: @@ -14,10 +18,10 @@ env: VERSION: "0.0.0" # Default version, will be overwritten jobs: - build: + docker: runs-on: labels: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 120 permissions: id-token: write contents: read @@ -34,24 +38,14 @@ jobs: - name: Read version from file run: echo "VERSION=$(DISABLE_VERSION_CHECK=true python ./inference/core/version.py)" >> $GITHUB_ENV - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Depot CLI + uses: depot/setup-action@v1 - - name: Build Docker image - uses: docker/build-push-action@v5 + - name: Build and Push + uses: depot/build-push-action@v1 with: - context: . + push: ${{ github.event_name == 'release' || (github.event.inputs.force_push == 'true') }} + project: grl7ffzxd7 + tags: ${{ env.TARGET_IMAGE }}:latest,${{ env.TARGET_IMAGE }}:${{ env.VERSION }} + platforms: linux/arm64 file: ./docker/dockerfiles/Dockerfile.onnx.jetson.6.2.0 - push: false - load: true - tags: | - ${{ env.TARGET_IMAGE }}:latest - ${{ env.TARGET_IMAGE }}:${{ env.VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Push built images - if: ${{ github.event.inputs.force_push == 'true' }} - run: | - docker push ${{ env.TARGET_IMAGE }}:latest - docker push ${{ env.TARGET_IMAGE }}:${{ env.VERSION }}