-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_setup.sh
35 lines (17 loc) · 862 Bytes
/
init_setup.sh
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
PYTHON_VERSION = 3.9
echo [$(date)]: "START INIT SETUP"
echo [$(date)]: "creating env file with python ${PYTHON_VERSION} version"
conda create -p ./rag_env python==${PYTHON_VERSION} -y
source avtivate ./rag_env
echo [$(date)]: "installing the requirements"
pip install -r requirements.txt
echo [$(date)]: "Setup and install GPU-accelerated libraries if available in the system"
if command -v nvidia-smi &> /dev/null
then
# conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install -U nvidia-cuda-cudnn-cu11.8 nvidia-cuda-cupti-cudnn-cu11.8 nvidia-cuda-nvrtc-cu11-cudnn-cu11.8 nvidia-cuda-runtime-cu11-cudnn-cu11.8
pip install -U torch==1.11.0+cu113 torchvision==0.12.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
else
echo "GPU not found"
fi
echo [$(date)]: "END INIT SETUP"