|
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
|
@@ -116,37 +95,6 @@ function install_121 {
|
116 | 95 | ldconfig
|
117 | 96 | }
|
118 | 97 |
|
119 |
| -function prune_116 { |
120 |
| - echo "Pruning CUDA 11.6 and CuDNN" |
121 |
| - ##################################################################################### |
122 |
| - # CUDA 11.6 prune static libs |
123 |
| - ##################################################################################### |
124 |
| - export NVPRUNE="/usr/local/cuda-11.6/bin/nvprune" |
125 |
| - export CUDA_LIB_DIR="/usr/local/cuda-11.6/lib64" |
126 |
| - |
127 |
| - 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" |
128 |
| - 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" |
129 |
| - |
130 |
| - if [[ -n "$OVERRIDE_GENCODE" ]]; then |
131 |
| - export GENCODE=$OVERRIDE_GENCODE |
132 |
| - fi |
133 |
| - |
134 |
| - # all CUDA libs except CuDNN and CuBLAS (cudnn and cublas need arch 3.7 included) |
135 |
| - ls $CUDA_LIB_DIR/ | grep "\.a" | grep -v "culibos" | grep -v "cudart" | grep -v "cudnn" | grep -v "cublas" | grep -v "metis" \ |
136 |
| - | xargs -I {} bash -c \ |
137 |
| - "echo {} && $NVPRUNE $GENCODE $CUDA_LIB_DIR/{} -o $CUDA_LIB_DIR/{}" |
138 |
| - |
139 |
| - # prune CuDNN and CuBLAS |
140 |
| - $NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublas_static.a -o $CUDA_LIB_DIR/libcublas_static.a |
141 |
| - $NVPRUNE $GENCODE_CUDNN $CUDA_LIB_DIR/libcublasLt_static.a -o $CUDA_LIB_DIR/libcublasLt_static.a |
142 |
| - |
143 |
| - ##################################################################################### |
144 |
| - # CUDA 11.6 prune visual tools |
145 |
| - ##################################################################################### |
146 |
| - export CUDA_BASE="/usr/local/cuda-11.6/" |
147 |
| - rm -rf $CUDA_BASE/libnvvp $CUDA_BASE/nsightee_plugins $CUDA_BASE/nsight-compute-2022.1.1 $CUDA_BASE/nsight-systems-2021.5.2 |
148 |
| -} |
149 |
| - |
150 | 98 | function prune_117 {
|
151 | 99 | echo "Pruning CUDA 11.7 and CuDNN"
|
152 | 100 | #####################################################################################
|
@@ -244,8 +192,6 @@ function prune_121 {
|
244 | 192 | while test $# -gt 0
|
245 | 193 | do
|
246 | 194 | case "$1" in
|
247 |
| - 11.6) install_116; prune_116 |
248 |
| - ;; |
249 | 195 | 11.7) install_117; prune_117
|
250 | 196 | ;;
|
251 | 197 | 11.8) install_118; prune_118
|
|
0 commit comments