From 62b6a9399de913cd83a45bb52b6bb3444e59a23b Mon Sep 17 00:00:00 2001 From: Tim Dettmers Date: Sun, 9 Oct 2022 19:02:28 -0700 Subject: Added CUDA 11.8 install and deployment. --- cuda_install.sh | 4 + deploy.sh | 225 +++++++++++++++++++++++++++++++++++++++++++++++++++ deploy_from_slurm.sh | 205 ---------------------------------------------- 3 files changed, 229 insertions(+), 205 deletions(-) create mode 100644 deploy.sh delete mode 100644 deploy_from_slurm.sh diff --git a/cuda_install.sh b/cuda_install.sh index 4508f4a..b6c553b 100644 --- a/cuda_install.sh +++ b/cuda_install.sh @@ -10,6 +10,7 @@ URL114=https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installer URL115=https://developer.download.nvidia.com/compute/cuda/11.5.2/local_installers/cuda_11.5.2_495.29.05_linux.run URL116=https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run URL117=https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run +URL118=https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run CUDA_VERSION=$1 @@ -52,6 +53,9 @@ if [[ -n "$CUDA_VERSION" ]]; then elif [[ "$CUDA_VERSION" -eq "117" ]]; then URL=$URL117 FOLDER=cuda-11.7 + elif [[ "$CUDA_VERSION" -eq "118" ]]; then + URL=$URL118 + FOLDER=cuda-11.8 else echo "argument error: No cuda version passed as input. Choose among: {111, 115}" fi diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..7d4f1a0 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,225 @@ +#!/bin/bash +BASE_PATH=$1 + +echo "MAKE SURE LD_LIBRARY_PATH IS EMPTY!" +echo $LD_LIBRARY_PATH + +if [[ ! -z "${LD_LIBRARY_PATH}" ]]; then + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + + +module unload cuda +module unload gcc + +rm -rf dist build +make cleaneggs +make cleanlibs + +make clean +export CUDA_HOME= +export CUDA_VERSION= +make cpuonly CUDA_VERSION="CPU" + +if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.0 +make cuda110 CUDA_VERSION=110 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.1 +make cuda11x CUDA_VERSION=111 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.2 +make cuda11x CUDA_VERSION=112 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.3 +make cuda11x CUDA_VERSION=113 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.4 +make cuda11x CUDA_VERSION=114 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.5 +make cuda11x CUDA_VERSION=115 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.6 + +make cuda11x CUDA_VERSION=116 +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.7 +make cuda11x CUDA_VERSION=117 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.8 +make cuda11x CUDA_VERSION=118 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + + +make clean +export CUDA_HOME=$BASE_PATH/cuda-10.2 +make cuda10x_nomatmul CUDA_VERSION=102 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda102_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.0 +make cuda110_nomatmul CUDA_VERSION=110 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.1 +make cuda11x_nomatmul CUDA_VERSION=111 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.2 +make cuda11x_nomatmul CUDA_VERSION=112 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.3 +make cuda11x_nomatmul CUDA_VERSION=113 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.4 +make cuda11x_nomatmul CUDA_VERSION=114 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.5 +make cuda11x_nomatmul CUDA_VERSION=115 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.6 + +make cuda11x_nomatmul CUDA_VERSION=116 +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.7 +make cuda11x_nomatmul CUDA_VERSION=117 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +make clean +export CUDA_HOME=$BASE_PATH/cuda-11.8 +make cuda11x_nomatmul CUDA_VERSION=118 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118_nocublaslt.so" ]; then + # Control will enter here if $DIRECTORY doesn't exist. + echo "Compilation unsuccessul!" 1>&2 + exit 64 +fi + +python -m build +python -m twine upload dist/* --verbose diff --git a/deploy_from_slurm.sh b/deploy_from_slurm.sh deleted file mode 100644 index bc53869..0000000 --- a/deploy_from_slurm.sh +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash -BASE_PATH=$1 - -echo "MAKE SURE LD_LIBRARY_PATH IS EMPTY!" -echo $LD_LIBRARY_PATH - -if [[ ! -z "${LD_LIBRARY_PATH}" ]]; then - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - - -module unload cuda -module unload gcc - -rm -rf dist build -make cleaneggs -make cleanlibs - -make clean -export CUDA_HOME= -export CUDA_VERSION= -make cpuonly CUDA_VERSION="CPU" - -if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.0 -make cuda110 CUDA_VERSION=110 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.1 -make cuda11x CUDA_VERSION=111 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.2 -make cuda11x CUDA_VERSION=112 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.3 -make cuda11x CUDA_VERSION=113 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.4 -make cuda11x CUDA_VERSION=114 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.5 -make cuda11x CUDA_VERSION=115 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.6 - -make cuda11x CUDA_VERSION=116 -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.7 -make cuda11x CUDA_VERSION=117 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - - -make clean -export CUDA_HOME=$BASE_PATH/cuda-10.2 -make cuda10x_nomatmul CUDA_VERSION=102 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda102_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.0 -make cuda110_nomatmul CUDA_VERSION=110 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.1 -make cuda11x_nomatmul CUDA_VERSION=111 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.2 -make cuda11x_nomatmul CUDA_VERSION=112 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.3 -make cuda11x_nomatmul CUDA_VERSION=113 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.4 -make cuda11x_nomatmul CUDA_VERSION=114 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.5 -make cuda11x_nomatmul CUDA_VERSION=115 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.6 - -make cuda11x_nomatmul CUDA_VERSION=116 -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -make clean -export CUDA_HOME=$BASE_PATH/cuda-11.7 -make cuda11x_nomatmul CUDA_VERSION=117 - -if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117_nocublaslt.so" ]; then - # Control will enter here if $DIRECTORY doesn't exist. - echo "Compilation unsuccessul!" 1>&2 - exit 64 -fi - -python -m build -python -m twine upload dist/* --verbose -- cgit v1.2.3