- Download and install CUDA v9.2+ from the NVIDIA developer website URL: https://developer.nvidia.com/cuda-downloads.
- Configure the CUDA dependencies. For Linux, go to a Terminal and edit the .bashrc file. Run the following commands and make sure you replace username and the CUDA version number as per your downloaded version:
nano /home/username/.bashrc export PATH=/usr/local/cuda-9.2/bin${PATH:+:${PATH}}$ export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} source .bashrc
- Add the lib64 directory to PATH for older DL4J versions.
- Run the nvcc --version command to verify the CUDA installation.
- Add Maven dependencies for the ND4J CUDA backend:
<dependency> <groupId>org.nd4j</groupId> <artifactId>nd4j-cuda-9.2</artifactId> ...