# ROS

<br>

## Build

- Install system: \
  (https://developer.nvidia.com/embedded/learn/get-started-jetson-agx-orin-devkit)

- Install _docker_: \
  (https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script)

- Install _nvidia-container-toolkit_: \
  (https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)

- Enable GPU-access for docker building:

  Run `sudo nano /etc/docker/daemon.json` and add:

  ```json
  {
    "runtimes": {
      "nvidia": {
        "path": "nvidia-container-runtime",
        "runtimeArgs": []
      }
    },
    "default-runtime": "nvidia"
  }
  ```

  Restart docker: `sudo systemctl restart docker`

- Install _vs-code_: \
  (https://code.visualstudio.com/docs/setup/linux)


- Test docker is working: \
  ```bash
  sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:35.4.1
  sudo docker run --runtime nvidia -it --rm --network=host nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.11-py3
  ```
