-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·34 lines (29 loc) · 1.57 KB
/
setup.sh
File metadata and controls
executable file
·34 lines (29 loc) · 1.57 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
#!/bin/bash -i
set -e
# Create and activate Conda environment
conda create -n dnlp python=3.10 -y
# Check for CUDA and install appropriate PyTorch version
if command -v nvidia-smi &>/dev/null; then
echo "CUDA detected, installing PyTorch with CUDA support."
conda run -n dnlp conda install -y pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
else
echo "CUDA not detected, installing CPU-only PyTorch."
conda run -n dnlp conda install -y pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 cpuonly -c pytorch
fi
# Install additional Conda packages
conda run -n dnlp conda install -y tqdm -c conda-forge
conda run -n dnlp conda install -y requests -c conda-forge
conda run -n dnlp conda install -y scikit-learn -c conda-forge
conda run -n dnlp conda install -y numpy -c conda-forge
conda run -n dnlp conda install -y pandas -c conda-forge
conda run -n dnlp conda install -y matplotlib -c conda-forge
conda run -n dnlp conda install -y seaborn -c conda-forge
conda run -n dnlp conda install -y scipy -c conda-forge
conda run -n dnlp conda install -y protobuf -c conda-forge
conda run -n dnlp conda install -y transformers -c conda-forge
conda run -n dnlp conda install -y tokenizers -c conda-forge
conda run -n dnlp conda install -y pyarrow=20.0.0 -c conda-forge
conda run -n dnlp conda install -y spacy -c conda-forge
conda run -n dnlp conda install -y sentence-transformers=5.0.0 -c conda-forge
# Install pip packages inside the environment
conda run -n dnlp pip install explainaboard-client==0.1.4 sacrebleu==2.5.1 optuna==3.6.0 importlib_metadata