-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcuda.sh
More file actions
31 lines (24 loc) · 1.03 KB
/
cuda.sh
File metadata and controls
31 lines (24 loc) · 1.03 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
# Update the system and install necessary packages
echo "Updating system packages..."
apt update && apt upgrade -y
pip install wheel
apt install wget -y
# wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb
# dpkg -i cuda-keyring_1.1-1_all.deb
apt update
apt-get -y install cuda-toolkit-12-8
# Install PyTorch with specific index URL
echo "Installing PyTorch..."
pip3 install torch==2.4.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Install other Python dependencies
echo "Installing Python dependencies..."
pip3 install kaleido transformers tqdm pandas numpy accelerate jupyter ipywidgets widgetsnbextension pandas-profiling
# set cuda environment variables
export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:$CUDA_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/lib64
# install flash-attn
pip3 install flash-attn --no-build-isolation
# install plotly matplotlib
pip3 install plotly matplotlib scikit-learn
echo "All dependencies installed successfully!"