## https://docs.nvidia.com/tao/tao-toolkit/text/tao_toolkit_quick_start_guide.html ## Before you get started, make sure you have installed the NVIDIA driver for your Linux distribution. ## The recommended way to install drivers is to use the package manager for your distribution but other installer mechanisms are also available (e.g. by downloading .run installers from NVIDIA Driver Downloads). ## Take Quadro P5000 for example ubuntu-drivers autoinstall #wget https://us.download.nvidia.com/XFree86/Linux-x86_64/470.86/NVIDIA-Linux-x86_64-470.86.run #chmod +x NVIDIA-Linux-x86_64-470.86.run #sudo apt install gcc make #sudo ./NVIDIA-Linux-x86_64-470.86.run # Docker ## Installing on Ubuntu and Debian ## Setting up Docker curl https://get.docker.com | sh && sudo systemctl --now enable docker ## Setting up NVIDIA Container Toolkit ## Setup the stable repository and the GPG key: distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \ && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list ## Install the nvidia-docker2 package (and dependencies) after updating the package listing: sudo apt-get update sudo apt-get install -y nvidia-docker2 ## Restart the Docker daemon to complete the installation after setting the default runtime: sudo systemctl restart docker ## At this point, a working setup can be tested by running a base CUDA container: sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi ## This should result in a console output shown below: adlink@adlink-IMB-M43H:~$ sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi Thu Dec 2 02:06:09 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.86 Driver Version: 470.86 CUDA Version: 11.4 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 Quadro P5000 Off | 00000000:01:00.0 Off | Off | | 26% 27C P8 5W / 180W | 18MiB / 16278MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+ adlink@adlink-IMB-M43H:~$ adlink@adlink-IMB-M43H:~$ ## GetNGC account and API key ## Log in to the NGC docker registry docker login nvcr.io Username: $oauthtoken Password: XXXXX ## Set up a Python virtualenv using a virtualenvwrapper ## Install virtualenvwrapper sudo apt install python-pip PIP_NO_CACHE_DIR=off python -m pip install --upgrade pip python3 -m pip install --user virtualenv python3 -m pip install --user virtualenvwrapper export WORKON_HOME=~/Envs export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 export WORKON_HOME=~/Envs export VIRTUALENVWRAPPER_VIRTUALENV=/home/adlink/.local/bin/virtualenv export PATH=$PATH:~/.local/bin source /home/adlink/.local/bin/virtualenvwrapper.shexport ## Create a new virtualenv using virtualenvwrapper. mkvirtualenv launcher -p /usr/bin/python3 ## Once you have logged into the virtualenv, the command prompt should show the name of your virtual environment ## (launcher) py-3.6.9 desktop: ## When you are done with you session, you may deactivate your virtualenv using the deactivate command: deactivate ## You may re-instantiate this created virtualenv env using the workon command. workon launcher ## Install the TAO Launcher Python package called nvidia-tao. sudo apt install python3-pip python3 -m pip install --upgrade pip pip3 install nvidia-pyindex pip3 install pyqt5==5.12 pyqtwebengine==5.12 pathlib ruamel-yaml pip3 install nvidia-tao tao --help ## Download a model ## Use this command to download the model you have chosen from the NGC model registry: ## ngc registry model download-version -dest ## For example, use this command to download the resnet 18 classification model to the $USER_EXPERIMENT_DIR directory: ngc registry model download-version \ nvidia/tao/pretrained_classification:resnet18 --dest \ $USER_EXPERIMENT_DIR/pretrained_resnet18 ## Use the examples wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/tao/cv_samples/versions/v1.3.0/zip -O cv_samples_v1.3.0.zip unzip -u cv_samples_v1.3.0.zip -d ./cv_samples_v1.3.0 && rm -rf cv_samples_v1.3.0.zip && cd ./cv_samples_v1.3.0 ## You can download these resources, by using the NGC CLI command available at the NGC resource page. ## Once you download the respective tutorial resource, you may instantiate the jupyter notebook server. pip3 install jupyter jupyter notebook --ip 0.0.0.0 --allow-root --port 8888 ## Open an internet browser on localhost and navigate to the following URL: http://0.0.0.0:8888