-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_python_cuda.sh
More file actions
executable file
·44 lines (37 loc) · 1.58 KB
/
install_python_cuda.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# ***source the file*** for install correctly
# https://rapids.ai/start.html#get-rapids
# https://pytorch.org/get-started/locally/
# Select upper cuda version
PYTHON_VER=3.9
RAPIDS_VER=22.12
CUDA_VER=11.7
ENV_NAME=cuda_$CUDA_VER
cd ~
if [ ! -f "/home/$USER/miniconda3/etc/profile.d/conda.sh" ]; then
echo "Installing Fresh miniconda"
CONDA_FILE=miniconda.sh
#wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh $CONDA_FILE
wget -O $CONDA_FILE https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x $CONDA_FILE
./$CONDA_FILE -b
rm ~/$CONDA_FILE
fi
# Create cuda env
echo "Building env"
source ~/miniconda3/etc/profile.d/conda.sh
# mamba installs much faster than conda
conda create -n $ENV_NAME -c rapidsai -c conda-forge -c nvidia \
python=$PYTHON_VER mamba -y
echo "Building env...done"
#https://medium.com/rapids-ai/plotly-census-viz-dashboard-powered-by-rapids-1503b3506652
# site libs
ln -s /nas/settings/site-packages.pth /nas/miniconda3/envs/$ENV_NAME/lib/python${PYTHON_VER}/site-packages/site-packages.pth
# Add own stuff
conda activate $ENV_NAME
# Both rapids and pytorch on same env
mamba install -c rapidsai -c pytorch -c conda-forge -c nvidia rapids=$RAPIDS_VER cudatoolkit=$CUDA_VER pytorch torchvision torchaudio pytorch-cuda=$CUDA_VER -y
mamba install -c conda-forge dask-sql -y
mamba install -c fastchan -c conda-forge -c fastai -c timeseriesai fastai tsai fastkaggle gpustat -y
mamba install -c conda-forge dvc dvc-azure chardet pyAesCrypt -y
mamba install -c conda-forge seaborn missingno mplfinance -y