Add the following lines to ~/.bashrc
export PATH=/usr/local/cuda-10.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH
export FORCE_CUDA="1"
Follow this guide (Build might take a couple of hours)
Create a dummy package for OpenCV installed from source (to prevent pip from trying to install another version of OpenCV)
cd ~
mkdir opencv-pip
cd opencv-pip
touch setup.py
Add the following content to setup.py
from setuptools import setup
setup(
name='opencv-python',
version='4.10.0-pre',
description='Dummy package for OpenCV installed from source',
install_requires=[],
)
Install dummy package
pip install --no-deps opencv-python
git clone https://github.com/ultralytics/ultralytics
cd ultralytics
Jetson Nano comes with Python 3.6.9, but we need Python 3.8.
sudo apt-get update
sudo apt install -y python3.8 python3.8-venv python3.8-dev python3-pip libopenmpi-dev libomp-dev libopenblas-dev libblas-dev libeigen3-dev libcublas-dev
python3.8 -m venv venv --system-site-packages
source venv/bin/activate
Versions that work with CUDA 10.2
$ pip install -U pip wheel gdown
$ gdown https://drive.google.com/uc?id=1hs9HM0XJ2LPFghcn7ZMOs5qu5HexPXwM
$ gdown https://drive.google.com/uc?id=1m0d8ruUY8RvCP9eVjZw4Nc8LAwM8yuGV
$ python3.8 -m pip install torch-*.whl torchvision-*.whl
pip install .
Make sure you are inside the virtual environment created in the previous steps
git clone https://github.com/digas99/rsa-project
cd rsa-project
pip install -r requirements.txt
python3 src/stream.py
python3 src/app.py