ssh -f -N -o ControlMaster=auto -D 1080 cmsusr.cms
export ALL_PROXY=socks5://localhost:1080
curl http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel7-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm -o cuda-repo-rhel7-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm
sudo rpm -i cuda-repo-rhel7-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm
sudo yum clean all
sudo yum -y install kernel-devel rpm-build
sudo yum -y install nvidia-driver-latest-dkms
sudo yum -y install cuda
Note that this will also build the kernel modules:
/lib/modules/3.10.0-957.1.3.el7.x86_64/extra/nvidia-drm.ko.xz
/lib/modules/3.10.0-957.1.3.el7.x86_64/extra/nvidia.ko.xz
/lib/modules/3.10.0-957.1.3.el7.x86_64/extra/nvidia-modeset.ko.xz
/lib/modules/3.10.0-957.1.3.el7.x86_64/extra/nvidia-uvm.ko.xz
Rather than building the kernel modules on every machine, we can build them once, and package them in an RPM that provides the same capabilities as nvidia-driver-latest-dkms-418.87.00-1.el7.x86_64.rpm
:
~fwyzard/cuda/package_nvidia_modules.sh
This will work for a single kernel at a time (so the kernel should be among the dependencies ?), but it might be good enough for the production environment.
# install the precompiled kernel drivers
sudo cp ~fwyzard/cuda/nvidia-driver-latest-3.10.0-957.1.3.el7.x86_64-418.87.00-1.el7.x86_64.rpm /var/cuda-repo-10-1-local-10.1.243-418.87.00/
sudo createrepo --update /var/cuda-repo-10-1-local-10.1.243-418.87.00/
sudo yum install nvidia-driver-latest-3.10.0-957.1.3.el7.x86_64-418.87.00
# prevent GCC from being installed as a dependency of NVCC
sudo rpm -i ~fwyzard/cuda/gcc-c++-dummy-4.8.5-1.el7.x86_64.rpm
# install CUDA
sudo yum install cuda