VISIONWORKS README.txt NVIDIA® VisionWorks™ Toolkit is a CUDA accelerated software development package for Computer Vision (CV). The toolkit is designed to provide a production-quality, standard interface that implements and extends the OpenVX standard, enabling high performance computer vision applications on NVIDIA Tegra devices. With the VisionWorks™ library of Computer Vision primitives, and its framework optimized for NVIDIA platforms, you can develop mobile and embedded applications for Robotics, Drones, Autonomous Driving, Augmented Reality (AR), Intelligent Video Analytics, and other Computer Vision markets. Where applicable, VisionWorks™ technologies take advantage of underlying hardware acceleration, such as NVIDIA® CUDA® technology, enabling significant speedup and thereby reducing engineering efforts in designing real-time vision applications. -------------------------------------------------------------------------------- NOTE: The installation instructions in this README supersede the instructions in the VisionWorks HTML documentation. These details are planned to be updated in the HTML documentation for the next release. PLATFORMS The following table shows the supported hardware, system software and the corresponding versions of OpenCV and CUDA. For desktop platforms a GPU of supported generation is required. You can check your GPU support status on official NVIDIA web page: ------------------------------------------------------------------------------- (1) NVIDIA(R) Jetson(TM) TX1 OS : NVIDIA(R) Tegra(R) Linux Driver Package R24.2 (L4T) OpenCV : OpenCV 2.4.13 CUDA : NVIDIA(R) CUDA(R) 8.0 (2) NVIDIA(R) DRIVE(TM) PX2 OS : NVIDIA(R) Vibrante(TM) 4 Linux (V4L) OpenCV : OpenCV 2.4.13 CUDA : NVIDIA(R) CUDA(R) 8.0 (3) Desktop X86_64 Ubuntu 14.04, with Kepler(TM) (compute capability 3.x), Maxwell(TM) (compute capability 5.x) and Pascal(TM) (compute capability 6.x) GPU generations OS : Ubuntu 14.04 x86_64 OpenCV : OpenCV 2.4.13 CUDA : NVIDIA(R) CUDA(R) 8.0 (4) Desktop X86_64 Ubuntu 16.04, with Kepler(TM) (compute capability 3.x), Maxwell(TM) (compute capability 5.x) and Pascal(TM) (compute capability 6.x) GPU generations OS : Ubuntu 16.04 x86_64 OpenCV : OpenCV 2.4.13 CUDA : NVIDIA(R) CUDA(R) 8.0 INSTALLATION INSTRUCTIONS ------------------------------------------------------------------------------- NOTE: This README file ONLY describes the installation instructions for Linux-based platforms: desktop Ubuntu and NVIDIA(R) Tegra(R) Linux Driver Package. Other platforms' installation instructions are available in corresponding README files. Install VisionWorks with the following steps: (1) CUDA Installation (2) VisionWorks Installation The following sections contain detailed instructions for the installation of these packages. These instructions use the following variables: o specifies the OS version (e.g., ubuntu1604). o specifies the architecture (e.g., amd64. arm64). o specifies the package release version (e.g., 2.4.13). o specifies the package release version (e.g., 8.0). o specifies the VisionWorks version (e.g., 1.5). o specifies the supported device. (1) CUDA Installation The NVIDIA invented CUDA(TM) technology provides a parallel computing platform and programming model that enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). Follow the direct target installation instructions based on your platform: o If you are using a host Ubuntu system as a standalone development platform, go to subsection (1-a). o If you are using a host as cross development platform, go to subsection (1-b). o If you are using Drive PX2 Vibrante platforms, go to subsection (1-c). o If you are using Jetson TX1 L4T platforms, go to subsection (1-d). o For all platforms, see subsection (1-e) after installation. (1-a) To install CUDA on Ubuntu 14.04/16.04 Desktop system for standalone development Download the CUDA Debian package from https://developer.nvidia.com/cuda-downloads. To install the package, execute the following commands: $ sudo dpkg -i cuda-repo-__amd64.deb $ sudo apt-get update $ sudo apt-get install cuda CUDA packages are installed to the following location on your host system: $ /usr/local/cuda- (1-b) To install CUDA for cross-build installation on Ubuntu 14.04/16.04 host system Download the CUDA version defined in the corresponding Platforms section for the target operating system from https://developer.nvidia.com/cuda-downloads. The arm64 foreign architecture must be enabled in order to install the cross- arm64 toolkit. To enable arm64 as a foreign architecture, the following commands must be executed: $ sudo dpkg --add-architecture arm64 To complete the installation, execute the following: $ sudo dpkg -i cuda-repo-__amd64.deb $ sudo apt-get update $ sudo apt-get install cuda cuda-cross-arm64 The cross-build installation of CUDA includes the standalone development files, which are installed under the same location on your host system: $ /usr/local/cuda- (1-c) To install CUDA on Drive PX2 Vibrante System CUDA installation on Drive PX2 Vibrante System is part of the Vibrante PDK installation and must be carried out on the host before rootfs setup and first boot of the target using: $ bash vibrante--cuda-.run The CUDA toolkit installs after running the following self-deleting shell script that is intended to be run 1 time from the target console: $ vibrante-setup.sh install-run-once-pkgs This installs all deferred run-once scripts in the target's /etc/rcS.d directory, which is why it is important to run the CUDA installer before flashing and first boot of the target. Note: To run, some CUDA samples require running a desktop manager, such as xfce4. The following warning message may appear when launching a CUDA application and can safely be ignored: libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.10.17-g3850ea5/modules.dep.bin' (1-d) To install CUDA on Jetson TX1 L4T Systems Execute the following commands: $ sudo dpkg -i cuda-repo-__.deb $ sudo apt-get update $ sudo apt-get install cuda-toolkit- (1-e) CUDA Post-Installation Step (all platforms) To access the CUDA binaries & libraries from any folder on Linux, add the CUDA locations to your system PATH and LD_LIBRARY_PATH environment variables. The exact steps depends on whether your target device has a 32-bit or 64-bit CPU. For 64-bit systems (eg: desktop PCs): $ echo "# Add 64-bit CUDA library & binary paths:" >> ~/.bashrc $ echo "export PATH=/usr/local/cuda-/bin:$PATH" >> ~/.bashrc $ echo "export LD_LIBRARY_PATH=/usr/local/cuda-/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc $ source ~/.bashrc For 32-bit systems (eg: most ARM systems): $ echo "# Add 32-bit CUDA library & binary paths:" >> ~/.bashrc $ echo "export PATH=/usr/local/cuda-/bin:$PATH" >> ~/.bashrc $ echo "export LD_LIBRARY_PATH=/usr/local/cuda-/lib:$LD_LIBRARY_PATH" >> ~/.bashrc $ source ~/.bashrc (2) VisionWorks Installation NVIDIA provides VisionWorks as a local repository Debian package named libvisionworks-repo__.deb. Its installation creates a local repository of all the VisionWorks Debian packages and points the OS software manager to that new repository. Then, you install the VisionWorks components using apt-get or any other Debian package software manager. All the dependent libraries are automatically installed. Follow the directions for installing VisionWorks based on your platform: o If you are installing on a desktop system for standalone operation and host system for cross development, go to subsection (2-a). o If you are installing on Drive PX2 running V4L, go to subsection (2-b). o If you are installing on Jetson TX1 running L4T, go to subsection (2-c). (2-a) To install VisionWorks on host system $ sudo dpkg -i libvisionworks-repo__.deb $ sudo apt-get update $ sudo apt-get install libvisionworks libvisionworks-dev \ libvisionworks-nvxio libvisionworks-nvxio-dev \ libvisionworks-samples libvisionworks-docs (2-b) To install VisionWorks on Drive PX2 - Vibrante system $ sudo dpkg -i libvisionworks-repo__.deb $ sudo apt-get update $ sudo apt-get install libvisionworks libvisionworks-dev \ libvisionworks-samples libvisionworks-docs (2-c) To install VisionWorks on Jetson TX1 - L4T system $ sudo add-apt-repository universe $ sudo dpkg -i libvisionworks-repo__.deb $ sudo apt-get update $ sudo apt-get install libvisionworks libvisionworks-dev \ libvisionworks-nvxio libvisionworks-nvxio-dev \ libvisionworks-samples libvisionworks-docs At this point, VisionWorks libraries, headers, samples, and documentation (and some extra files) are installed to your Jetson or desktop device. The following table shows various directories where the VisionWorks packages are located after installation. ________________________________________________________________________________ Package Name : libvisionworks Installed location: /usr/lib Description : Main package with pre-built shared libraries. ________________________________________________________________________________ Package Name : libvisionworks-dev Installed location: /usr/include /usr/lib /usr/lib/pkgconfig /usr/share/visionworks/cmake Description : Development package with headers, supplementary CMake and package config files. ________________________________________________________________________________ Package Name : libvisionworks-nvxio Installed location: /usr/lib Description : Package with prebuilt NVXIO shared library. ________________________________________________________________________________ Package Name : libvisionworks-nvixo-dev Installed location: /usr/include /usr/lib /usr/lib/pkgconfig /usr/share/VisionWorks-NVXIO/cmake Description : Development NVXIO package with headers, supplementary CMake and package config files. ________________________________________________________________________________ Package Name : libvisionworks-samples Installed location: /usr/share/visionworks/sources Description : Source code for samples and demos. ________________________________________________________________________________ Package Name : libvisionworks-docs Installed location: /usr/share/visionworks/docs Description : Documentation package for this release of VisionWorks. ________________________________________________________________________________ After VisionWorks installation, use the installed script to copy samples from /usr/share/visionworks/sources to a directory with write access and compile them using make: $ /usr/share/visionworks/sources/install-samples.sh ~/ $ cd ~/VisionWorks--Samples/ $ make -j4 If your system does not include a compiler, you can find the instructions on the web to install gcc. Note: See Supported Software in the Release Notes for the specific versions required. UNINSTALL INSTRUCTIONS -------------------------------------------------------------------------------- This section describes the uninstallation steps for VisionWorks and CUDA. (1) Uninstall VisionWorks (2) Uninstall CUDA (1) To uninstall VisionWorks Uninstall VisionWorks packages with the following command: $ sudo apt-get remove --purge libvisionworks-samples libvisionworks-dev \ libvisionworks-nvxio libvisionworks-nvxio-dev \ libvisionworks-docs libvisionworks Then uninstall local repositories: $ sudo apt-get purge libvisionworks-repo Update apt cache after removing the repository: $ sudo apt-get update (2) Uninstall CUDA Uninstall CUDA repo package, CUDA toolkit package, run `autoremove` command and update the apt cache using the following commands: $ sudo apt-get remove --purge cuda-repo- $ sudo apt-get remove --purge cuda-toolkit- $ sudo apt-get autoremove $ sudo apt-get update Note: The `autoremove` command will remove all packages on the user’s system that have been abandoned. An abandoned package is a package that was installed as a dependency, and the package that depends on it has since been removed.