$ pip3 install virtualenv virtualenvwrapper
$ mkdir $HOME/.virtualenvs
$ vi ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /home/user/.local/bin/virtualenvwrapper.sh
$ source ~/.bashrc
$ mkvirtualenv tao -p /usr/bin/python3
$ deactivate
$ workon tao
$ git clone https://github.com/NVIDIA-AI-IOT/tao-toolkit-triton-apps.git
$ cd tao-toolkit-triton-apps/tao_triton
$ pip3 install -r requirements-pip.txt
$ pip3 install nvidia-pyindex
$ pip3 install tritonclient[all]
$ add2virtualenv=`pwd`
$ cd ..
$ bash scripts/start_server.sh 若產生下列錯誤
...
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease [1581 B]
Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
...
$ vi docker/Dockerfile
在
# Download and install TAO Toolkit converter
前,加上
RUN apt-key del 7fa2af80
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub
$ bash scripts/start_server.sh
new session, 準備圖檔於 images 目錄
$ mkdir images images_out
$ cd images
$ wget https://github.com/openalpr/benchmarks/raw/master/seg_and_ocr/usimages/ca286.png
$ mv ca286.png 5VCF203.png
$ wget https://developer.nvidia.com/sites/default/files/akamai/NGC_Images/models/peoplenet/input_11ft45deg_000070.jpg
$ mv input_11ft45deg_000070.jpg peopleseg.jpg
$ cd ../tao-toolkit-triton-apps
$ export PYTHONPATH=`pwd`:$PYTHONPATH
$ pip install scikit-image
$ python tao_triton/python/entrypoints/tao_client.py ../images -m peoplenet_tao -x 1 -b 8 --mode DetectNet_v2 -i https -u localhost:8000 --async --output_path ../images_out --postprocessing_config tao_triton/python/clustering_specs/clustering_config_peoplenet.prototxt
$ python tao_triton/python/entrypoints/tao_client.py ../images -m dashcamnet_tao -x 1 -b 8 --mode DetectNet_v2 -i https -u localhost:8000 --async --output_path ../images_out --postprocessing_config tao_triton/python/clustering_specs/clustering_config_dashcamnet.prototxt --class_list car,bicycle,person,road_sign
$ python tao_triton/python/entrypoints/tao_client.py ../images -m vehicletypenet_tao -x 1 -b 1 --mode Classification -i https -u localhost:8000 --async --output_path ../images_out
$ python tao_triton/python/entrypoints/tao_client.py ../images -m lprnet_tao -x 1 -b 1 --mode LPRNet -i https -u localhost:8000 --async --output_path ../images_out
$ python tao_triton/python/entrypoints/tao_client.py ../images -m yolov3_tao -x 1 -b 1 --mode YOLOv3 -i https -u localhost:8000 --async --output_path ../images_out
$ python tao_triton/python/entrypoints/tao_client.py ../images -m peoplesegnet_tao -x 1 -b 1 --mode Peoplesegnet -i https -u localhost:8000 --async --output_path ../images_out
沒有留言:
張貼留言