-
Notifications
You must be signed in to change notification settings - Fork 0
/
4_cuda_conda.sh
23 lines (17 loc) · 959 Bytes
/
4_cuda_conda.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -x # print commands and their arguments as they are executed
set -e # exit immediately if anything you're running returns a non-zero return code
source proxy/en.sh
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
version=11.4
sudo -E add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/ /"
sudo -E apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/${distribution}/x86_64/7fa2af80.pub
wget https://developer.download.nvidia.com/compute/cuda/repos/${distribution}/x86_64/cuda-${distribution}.pin -P /tmp
sudo -E mv /tmp/cuda-${distribution}.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo -E apt update
sudo -E apt install -y cuda
echo '
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' \
>> ~/.zshrc
# https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh