A lot of these dependencies are not pre-compiled for the Jetson Nano so expect this to take multiple hours.
Jetpack is an image with Deep Learning related libs preinstalled. Follow the instructions at https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit
I recommend you use a virtual env to isolate this project dependencies from your system.
sudo apt install python3-pip
sudo apt install -y python3-venv
python3 -m venv ~/python-envs/rc
source ~/python-envs/rc/bin/activate
Follow the instructions at https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-8-0-now-available/
might also need https://forums.developer.nvidia.com/t/cannot-install-pytorch/149226/3
for pytorch (from https://forums.developer.nvidia.com/t/cannot-install-pytorch/149226/3)
You may have issues installing torchvision in your virtualenv. Try this:
cd torchvision
easy_install . --user --install-dir ~/python-envs/rc/lib/python3.6/site-packages
Follow the instructions at https://docs.donkeycar.com/guide/robot_sbc/tensorrt_jetson_nano/
Follow the instructions at https://docs.donkeycar.com/parts/imu/.
Follow instructions at https://github.com/rbonghi/jetson_stats
Re-compiling cv2 takes a long time, so you can link the pre-compiled version to your virtualenv.
ln -s /usr/lib/python3.6/dist-packages/cv2/python-3.6/cv2.cpython- ite-packages/cv2.cpython-36m-aarch64-linux-gnu.so
-
Open a terminal and call the following to install the JetCam Python package.
cd $HOME git clone https://github.com/NVIDIA-AI-IOT/jetcam cd jetcam ~/python-envs/rc/bin/python setup.py install
-
Execute the following command to install the torch2trt Python package
cd $HOME git clone https://github.com/NVIDIA-AI-IOT/torch2trt cd torch2trt ~/python-envs/rc/bin/python setup.py install
-
Execute the following in a terminal to install the JetRacer package
cd $HOME git clone https://github.com/NVIDIA-AI-IOT/jetracer cd jetracer ~/python-envs/rc/bin/python setup.py install
Install the yolov5 pip package
pip install yolov5
You might miss libs to install/compile yolov5 dependencies:
sudo apt-get update sudo apt-get install -y build-essential libatlas-base-dev gfortran
Download yolov5s weights:
cd wandb-jetracer/src/scripts/
wget https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt