Skip to content
Snippets Groups Projects
Commit 6726ad74 authored by Christian Dreher's avatar Christian Dreher
Browse files

feature: Add CUDA 11.2 + cuDNN 8.1.

parent 751688e8
No related branches found
No related tags found
No related merge requests found
{
"system": {
"run": {
"script": "scripts/install_cuda_11.2_cudnn_8.1.sh"
}
},
"install": {
"env": {
"CUDA_HOME": "$MODULE_PATH",
"CUDA_ROOT": "$CUDA_HOME/bin",
"CUDA_TOOLKIT_ROOT_DIR": "$CUDA_HOME",
"PATH": "$CUDA_HOME/bin:$PATH",
"LD_LIBRARY_PATH": "$CUDA_HOME/lib64:$LD_LIBRARY_PATH"
}
}
}
#!/bin/bash
if [[ "$CUDA_CUDNN_ARCHIVES_PATH" == "" ]]; then
if [ -d "/common/h2t/Archive/Software/cuda/linux" ]; then
echo "Using CUDA_CUDNN_ARCHIVES_PATH=/common/h2t/Archive/Software/cuda/linux"
export CUDA_CUDNN_ARCHIVES_PATH=/common/h2t/Archive/Software/cuda/linux
else
echo "CUDA_CUDNN_ARCHIVES_PATH is unset. Export the variable and have it either point to the H2T fileserver (<h2t>/Archive/Software/cuda/linux) or your own supplied folder with the corresponding archives."
exit 1
fi
else
echo "Using CUDA and cuDNN archives supplied through '$CUDA_CUDNN_ARCHIVES_PATH'."
fi
install_dir="$MODULE_PATH"
cuda_installer="$CUDA_CUDNN_ARCHIVES_PATH/cuda_11.2.2_460.32.03_linux.run"
cudnn_pkg="$CUDA_CUDNN_ARCHIVES_PATH/cudnn-11.2-linux-x64-v8.1.1.33.tgz"
# Flag-files to indicate installation status.
cuda_done="$install_dir/installed_cuda"
cudnn_done="$install_dir/installed_cudnn"
mkdir -p $install_dir
if [[ ! -f "$cuda_done" ]]; then
echo "Installing CUDA 11.2 ('$cuda_installer') to '$install_dir'."
sh "$cuda_installer" --silent --defaultroot="$install_dir" --toolkit --toolkitpath="$install_dir" --no-man-page --override
# Install twice to make sure symlinks work correctly...
sh "$cuda_installer" --silent --defaultroot="$install_dir" --toolkit --toolkitpath="$install_dir" --no-man-page --override && touch "$cuda_done"
# Some library files are not put in the correct folder, so copy them manually
cp -r "$install_dir/targets/x86_64-linux/lib/"* "$install_dir/lib64"
echo "Done."
else
echo "CUDA 11.2 already installed in '$install_dir'."
fi
if [[ ! -f "$cudnn_done" ]]; then
echo "Installing cuDNN 8.1 ('$cudnn_pkg') to '$install_dir'."
tar -xf "$cudnn_pkg" --strip-components=1 -C "$install_dir" && touch "$cudnn_done"
echo "Done."
else
echo "cuDNN already installed in '$install_dir'."
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment