2023-07-06 21:20:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euxo pipefail
|
|
|
|
|
|
|
|
SCRIPT_DIR="/usr/local/src/tensorrt_demos"
|
|
|
|
|
|
|
|
# Clone tensorrt_demos repo
|
|
|
|
git clone --depth 1 https://github.com/NateMeyer/tensorrt_demos.git -b conditional_download
|
|
|
|
|
|
|
|
# Build libyolo
|
2023-07-26 12:50:41 +02:00
|
|
|
if [ ! -e /usr/local/cuda ]; then
|
|
|
|
ln -s /usr/local/cuda-* /usr/local/cuda
|
|
|
|
fi
|
2024-03-05 13:04:13 +01:00
|
|
|
cd ./tensorrt_demos/plugins && make all -j$(nproc) computes="${COMPUTE_LEVEL:-}"
|
2023-07-06 21:20:33 +02:00
|
|
|
cp libyolo_layer.so /usr/local/lib/libyolo_layer.so
|
|
|
|
|
|
|
|
# Store yolo scripts for later conversion
|
|
|
|
cd ../
|
|
|
|
mkdir -p ${SCRIPT_DIR}/plugins
|
|
|
|
cp plugins/libyolo_layer.so ${SCRIPT_DIR}/plugins/libyolo_layer.so
|
|
|
|
cp -a yolo ${SCRIPT_DIR}/
|