Files
gps-denied-onboard/Dockerfile
T
Yuzviak 094895b21b feat(phases 2-7): implement full GPS-denied navigation pipeline
Phase 2 — Visual Odometry:
  - ORBVisualOdometry (dev/CI), CuVSLAMVisualOdometry (Jetson)
  - TRTInferenceEngine (TensorRT FP16, conditional import)
  - create_vo_backend() factory

Phase 3 — Satellite Matching + GPR:
  - SatelliteDataManager: local z/x/y tiles, ESKF ±3σ tile selection
  - GSD normalization (SAT-03), RANSAC inlier-ratio confidence (SAT-04)
  - GlobalPlaceRecognition: Faiss index + numpy fallback

Phase 4 — MAVLink I/O:
  - MAVLinkBridge: GPS_INPUT 15+ fields, IMU callback, 1Hz telemetry
  - 3-consecutive-failure reloc request
  - MockMAVConnection for CI

Phase 5 — Pipeline Wiring:
  - ESKF wired into process_frame: VO update → satellite update
  - CoordinateTransformer + SatelliteDataManager via DI
  - MAVLink state push per frame (PIPE-07)
  - Real pixel_to_gps via ray-ground projection (PIPE-06)
  - GTSAM ISAM2 update when available (PIPE-03)

Phase 6 — Docker + CI:
  - Multi-stage Dockerfile (python:3.11-slim)
  - docker-compose.yml (dev), docker-compose.sitl.yml (ArduPilot SITL)
  - GitHub Actions: ci.yml (lint+pytest+docker smoke), sitl.yml (nightly)
  - tests/test_sitl_integration.py (8 tests, skip without SITL)

Phase 7 — Accuracy Validation:
  - AccuracyBenchmark + SyntheticTrajectory
  - AC-PERF-1: 80% within 50m 
  - AC-PERF-2: 60% within 20m 
  - AC-PERF-3: p95 latency < 400ms 
  - AC-PERF-4: VO drift 1km < 100m  (actual ~11m)
  - scripts/benchmark_accuracy.py CLI

Tests: 195 passed / 8 skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 17:00:41 +03:00

62 lines
2.0 KiB
Docker

# ---------------------------------------------------------------------------
# GPS-Denied Onboard — Production Dockerfile
# ---------------------------------------------------------------------------
# Build: docker build -t gps-denied-onboard .
# Run: docker run -p 8000:8000 gps-denied-onboard
#
# Jetson Orin Nano Super deployment: use base image
# nvcr.io/nvidia/l4t-pytorch:r36.2.0-pth2.1-py3
# and replace python:3.11-slim with that image.
# ---------------------------------------------------------------------------
FROM python:3.11-slim AS builder
WORKDIR /build
# System deps for OpenCV headless + numpy compilation
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml .
# Install only the package metadata (no source yet) to cache deps layer
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -e "." --no-build-isolation
# ---------------------------------------------------------------------------
FROM python:3.11-slim AS runtime
WORKDIR /app
# Runtime system deps (OpenCV headless needs libGL + libglib)
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy installed packages from builder
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
# Copy application source
COPY src/ src/
COPY pyproject.toml .
# Runtime environment
ENV PYTHONPATH=/app/src \
GPS_DENIED_DB_PATH=/data/flights.db \
GPS_DENIED_TILE_DIR=/data/satellite_tiles \
GPS_DENIED_LOG_LEVEL=INFO
# Data volume: database + satellite tiles
VOLUME ["/data"]
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
CMD ["uvicorn", "gps_denied.app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]