|
2 | 2 |
|
3 | 3 | set -ex
|
4 | 4 |
|
5 |
| -function install_116 { |
6 |
| - echo "Installing CUDA 11.6 and CuDNN 8.3" |
7 |
| - rm -rf /usr/local/cuda-11.6 /usr/local/cuda |
8 |
| - # install CUDA 11.6.2 in the same container |
9 |
| - wget -q https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run |
10 |
| - chmod +x cuda_11.6.2_510.47.03_linux.run |
11 |
| - ./cuda_11.6.2_510.47.03_linux.run --toolkit --silent |
12 |
| - rm -f cuda_11.6.2_510.47.03_linux.run |
13 |
| - rm -f /usr/local/cuda && ln -s /usr/local/cuda-11.6 /usr/local/cuda |
14 |
| - |
15 |
| - # cuDNN license: https://developer.nvidia.com/cudnn/license_agreement |
16 |
| - mkdir tmp_cudnn && cd tmp_cudnn |
17 |
| - wget -q https://developer.download.nvidia.com/compute/redist/cudnn/v8.3.2/local_installers/11.5/cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz -O cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz |
18 |
| - tar xf cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive.tar.xz |
19 |
| - cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/include/* /usr/local/cuda/include/ |
20 |
| - cp -a cudnn-linux-x86_64-8.3.2.44_cuda11.5-archive/lib/* /usr/local/cuda/lib64/ |
21 |
| - cd .. |
22 |
| - rm -rf tmp_cudnn |
23 |
| - ldconfig |
24 |
| -} |
25 |
| - |
26 | 5 | function install_117 {
|
27 | 6 | echo "Installing CUDA 11.7 and CuDNN 8.5 and NCCL 2.14"
|
28 | 7 | rm -rf /usr/local/cuda-11.7 /usr/local/cuda
|
@@ -85,37 +64,6 @@ function install_118 {
|
85 | 64 | ldconfig
|
86 | 65 | }
|
87 | 66 |
|
88 |
| -function prune_116 { |
89 |
| - echo "Pruning CUDA 11.6 and CuDNN" |
90 |
| - ##################################################################################### |
91 |
| - # CUDA 11.6 prune static libs |
92 |
| - ##################################################################################### |
93 |
| - export NVPRUNE="/usr/local/cuda-11.6/bin/nvprune" |
94 |
| - export CUDA_LIB_DIR="/usr/local/cuda-11.6/lib64" |
95 |
| - |
96 |
| - export GENCODE="-gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86" |
97 |
| - export GENCODE_CUDNN="-gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86" |
98 |
| - |
99 |
| - if [[ -n "$OVERRIDE_GENCODE" ]]; then |
100 |
| - export GENCODE=$OVERRIDE_GENCODE |
101 |
| - fi |
102 |
| - |
103 |
| - # all CUDA libs except CuDNN and CuBLAS (cudnn and cublas need arch 3.7 included) |
104 |
| - ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \ |
105 |
| - | xargs -I {} bash -c \ |
106 |
| - "echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}" |
107 |
| - |
108 |
| - # prune CuDNN and CuBLAS |
109 |
| - $NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a |
110 |
| - $NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a |
111 |
| - |
112 |
| - ##################################################################################### |
113 |
| - # CUDA 11.6 prune visual tools |
114 |
| - ##################################################################################### |
115 |
| - export CUDA_BASE="/usr/local/cuda-11.6/" |
116 |
| - rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2022.1.1 $CUDA_BASE/nsight-systems-2021.5.2 |
117 |
| -} |
118 |
| - |
119 | 67 | function prune_117 {
|
120 | 68 | echo "Pruning CUDA 11.7 and CuDNN"
|
121 | 69 | #####################################################################################
|
@@ -182,8 +130,6 @@ function prune_118 {
|
182 | 130 | while test $# -gt 0
|
183 | 131 | do
|
184 | 132 | case "$1" in
|
185 |
| - 11.6) install_116; prune_116 |
186 |
| - ;; |
187 | 133 | 11.7) install_117; prune_117
|
188 | 134 | ;;
|
189 | 135 | 11.8) install_118; prune_118
|
|
0 commit comments