Skip to content

Conversation

@rajjainl
Copy link
Owner

This pull request was generated by @kiro-agent 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Summary

This PR updates the backend for JetPack 6 Orin compatibility, migrating from Python 3.9 to Python 3.10 (the native interpreter for JetPack 6).

JetPack 6 Specifications

Component Version
OS Ubuntu 22.04
Python 3.10 (native)
CUDA 12.6
TensorRT 10.3
cuDNN 9.3

Why Python 3.10 (not 3.11)?

  1. JetPack 6 ships with Python 3.10 as the default interpreter on Ubuntu 22.04
  2. NVIDIA's pre-built wheels (PyTorch, TensorRT bindings, etc.) for JetPack 6 are compiled for Python 3.10
  3. Using Python 3.11 would require building NVIDIA libraries from source, causing compatibility issues

Changes

Dockerfile (src/backend/Dockerfile)

  • Updated base image to Ubuntu 22.04 (JetPack 6 native OS)
  • Changed from Python 3.9 (compiled from source) to Python 3.10 (apt package)
  • Improved Dockerfile structure with better layer caching
  • Added proper pip requirements installation
  • Removed legacy libssl1.1 dependency (not available in Ubuntu 22.04)
  • Removed OS 18.04 specific code
  • Updated CMD to use generic python3 instead of python3.9

requirements.txt (src/backend/requirements.txt)

Package Old Version New Version Notes
Jetson.GPIO 2.0.21 2.1.0 JetPack 6 compatible
awsiotsdk 1.11.9 1.21.0 Latest stable
marshmallow 3.19.0 3.21.0
pyyaml 5.4.1 6.0.1 Python 3.10 compatible
grpcio 1.56.2 1.62.0 Aligned versions
grpcio-tools 1.51.1 1.62.0 Aligned with grpcio
jsonschema 4.17.3 4.21.0
numpy 1.24.3 1.26.4 Python 3.10 optimized
pycairo 1.23.0 1.26.0
PyGObject 3.42.2 3.48.0
psutil 5.9.5 5.9.8
fastapi 0.109.2 0.110.0
uvicorn 0.23.2 0.28.0
pydantic 2.1.1 2.6.0
asgi-correlation-id 4.2.0 4.3.0
structlog 22.1.0 24.1.0
sqlalchemy 2.0.21 2.0.28
alembic 1.12.1 1.13.1
httpx 0.24.1 0.27.0
scikit-learn 1.0.2 1.4.0 Python 3.10 support

Important Notes

DLR (Neo Deep Learning Runtime)

  • dlr==1.10.0 is retained but may need custom build for JetPack 6
  • Check neo-ai-dlr for JetPack 6 wheels

Jetson.GPIO

  • Upgraded to 2.1.0 for JetPack 6 compatibility
  • Should work with Orin GPIO configuration

Testing Recommendations

  1. Build Docker image on JetPack 6 Orin device:

    docker build -t dda-backend:jetpack6 --build-arg OS=22.04 -f src/backend/Dockerfile src/backend/
  2. Verify Python version inside container:

    docker run --rm dda-backend:jetpack6 python3 --version
    # Expected: Python 3.10.x
  3. Test NVIDIA library compatibility (TensorRT, CUDA) on the Orin device

This commit updates the backend for JetPack 6 Orin compatibility:

Dockerfile changes:
- Updated base image to Ubuntu 22.04 (JetPack 6 native)
- Changed from Python 3.9 (compiled from source) to Python 3.10 (apt package)
- Python 3.10 is the native interpreter for JetPack 6
- Improved Dockerfile structure with better layer caching
- Added proper pip requirements installation
- Removed legacy libssl1.1 and OS 18.04 specific code
- Updated CMD to use generic python3 instead of python3.9

requirements.txt changes:
- Added header comments documenting JetPack 6 compatibility
- Upgraded Jetson.GPIO from 2.0.21 to 2.1.0 for JetPack 6
- Upgraded awsiotsdk from 1.11.9 to 1.21.0
- Upgraded marshmallow from 3.19.0 to 3.21.0
- Upgraded pyyaml from 5.4.1 to 6.0.1 (Python 3.10 compatible)
- Aligned grpcio and grpcio-tools to 1.62.0
- Upgraded jsonschema from 4.17.3 to 4.21.0
- Upgraded numpy from 1.24.3 to 1.26.4
- Upgraded pycairo from 1.23.0 to 1.26.0
- Upgraded PyGObject from 3.42.2 to 3.48.0
- Upgraded psutil from 5.9.5 to 5.9.8
- Upgraded fastapi from 0.109.2 to 0.110.0
- Upgraded uvicorn from 0.23.2 to 0.28.0
- Upgraded pydantic from 2.1.1 to 2.6.0
- Upgraded asgi-correlation-id from 4.2.0 to 4.3.0
- Upgraded structlog from 22.1.0 to 24.1.0
- Upgraded sqlalchemy from 2.0.21 to 2.0.28
- Upgraded alembic from 1.12.1 to 1.13.1
- Upgraded httpx from 0.24.1 to 0.27.0
- Upgraded scikit-learn from 1.0.2 to 1.4.0 (Python 3.10 support)
- Added documentation notes for dlr JetPack 6 compatibility

JetPack 6 specifications:
- Ubuntu 22.04 base OS
- Python 3.10 (native)
- CUDA 12.6
- TensorRT 10.3
- cuDNN 9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants