HPMC User Guide v 1.00
© 2026 Bassem W. Jamaleddine


M

   Installing Torch cuDNN and PyTorch



To install cuDNN cudnn.torch, the Torch7 bindings for NVIDIA's cuDNN library, both cutorch and cunn must be installed first.

Before installing Lua/Torch the NVIDIA library must be exported in LD_LIBRARY_PATH. To install cudnn.torch (the Torch7 bindings for NVIDIA's cuDNN library),

#  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia:/opt/lib64:/opt/lib:/usr/local/cuda/lib64:/usr/lib64/atlas

To install Torch, in a terminal, run the commands

#  curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps
     bash

#  git clone https://github.com/torch/distro.git ~/torch --recursive

#  cd ~/torch

#  ./install.sh

If you want to add the Torch environment variables to your profile or to the system profile, you can find these variables in cupath.sh.

#  cat cupath.sh



To install cutorch (the CUDA backend for Torch7) using LuaRocks:

#  luarocks install --server=https://luarocks.org/dev cutorch

To install cunn, the CUDA-enabled neural network library for Torch7

#  luarocks install cunn





Installing PyTorch requires to have cmake3 installed, python3 with openssl enabled, and the specific version of GCC that is compatible with pytorch distribution. The following shows how to install PyTorch on your HPMC.

First install cmake3

#  yum install cmake3



If cmake3 failed to install, then you can install it explicitly by downloading the package and using the rpm command.

#  mkdir yumdown-cmake3

#  yumdownloader --destdir=./yumdown-cmake3 --resolve cmake3

#  (cd yumdown-cmake3; rpm -qilp cmake3-data-3.17.5-1.el7.noarch.rpm)

This section is not included in the SAMPLE PREVIEW.
Test that numpy is available in python3

#  python3 -m pip show numpy


--- 
Metadata-Version: 2.0  
Name: numpy 
Version: 1.13.3 
Summary: NumPy: array processing for numbers, strings, records, and objects. 
Home-page: http://www.numpy.org 
Author: NumPy Developers 
Author-email: numpy-discussion@python.org 
Installer: pip  
License: BSD  
Location: /usr/lib64/python2.7/site-packages 
Requires:  
Classifiers: 
  Development Status :: 5 - Production/Stable 
  Intended Audience :: Science/Research 
  Intended Audience :: Developers 
  License :: OSI Approved 
  Programming Language :: C 
  Programming Language :: Python 
  Programming Language :: Python :: 2 
  Programming Language :: Python :: 2.7  
  Programming Language :: Python :: 3 
  Programming Language :: Python :: 3.4  
  Programming Language :: Python :: 3.5  
  Programming Language :: Python :: 3.6                                                                                                            
  Programming Language :: Python :: Implementation :: CPython                                                                                      
  Topic :: Software Development 
  Topic :: Scientific/Engineering 
  Operating System :: Microsoft :: Windows 
  Operating System :: POSIX 
  Operating System :: Unix 
  Operating System :: MacOS