Skip to content
Edward H edited this page Jan 4, 2021 · 4 revisions

Environment Setup

Dependencies

There are several packages required to build Altis from source. Execute the following instructions to install these packages:

sudo apt install libtool
sudo apt install autotools-dev
sudo apt install automake
sudo apt install autoconf

CUDA Installation

Altis requires CUDA to be installed in the first place. Assume you have the driver installed already, you can download the latest CUDA tooklit from https://developer.nvidia.com/cuda-downloads. Select runfile (local) as the installer type. We also heard people having some success using the deb package installing approach but it may cause problems during building process so we will stick to the runfile approach. After the runfile is downloaded, execute the cuda_<version>_linux.run file (may require sudo). One common problem here is NVIDIA CUDA Compiler (NVCC) included in the toolkit may be incompatible with the gcc version on the host machine. To figure out the supported GCC version for your CUDA installation, please refer to https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html.

After CUDA is successfully installed, set up the environment variable by adding the following lines to your .bashrc file (if you use non-bash shells then add the following lines to the corresponding configuration file).

To set up the PATH variable:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}

To set up the LD_LIBRARY_PATH variable:

export LD_LIBRARY_PATH=/usr/local/cuda/lib ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

For more information regarding CUDA installation, please refer to https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile

cuDNN Installation

To install cuDNN, download the tar file from https://developer.nvidia.com/CUDNN. Make sure the cuDNN version matches the CUDA version installed. We haven't tested other installation approaches so we will stick to normal cuDNN Library for Linux. After the file is downloaded, execute the following instructions:

tar -xzvf cudnn-x.x-linux-x64-v8.x.x.x.tgz
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

For more information regarding cuDNN installation, please refer to https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux.

OptiX Installation

To install OptiX, download the required .sh file from https://developer.nvidia.com/designworks/optix/download. Currently, we support OptiX 6.5 and earlier versions. OptiX 7 is not backwards compatible with previous versions and we plan to port the raytracing benchmark to newer OptiX version in the future. For now, we will stick to OptiX 6.5.

Run the downloaded shell script to extract required OptiX files:

./NVIDIA-OptiX-SDK-6.5.0-linux64.sh

Move the NVIDIA-OptiX-SDK-6.5.0-linux64 directory to your preferred location. We will refer to the path to this directory as <path_to_optix>. Add the installation path as an environment variable by adding the following lines to your .bashrc file:

export OPTIX_INSTALL_PATH=<path_to_optix>

Change your export LD_LIBRARY_PATH in the .bashrc to the following:

export LD_LIBRARY_PATH=$OPTIX_INSTALL_PATH/lib64:/usr/local/cuda/lib ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Clone this wiki locally