-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcuda.sh
More file actions
32 lines (25 loc) · 1.14 KB
/
cuda.sh
File metadata and controls
32 lines (25 loc) · 1.14 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
# Update the system and install necessary packages
echo "Updating system packages..."
apt update && apt upgrade -y
# Install CUDA toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-8
# Install uv package manager
echo "Installing uv package manager..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install PyTorch with specific index URL
echo "Installing PyTorch..."
uv pip install torch==2.4.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Install other Python dependencies
echo "Installing Python dependencies..."
uv pip install kaleido transformers tqdm pandas numpy accelerate jupyter pandas-profiling plotly matplotlib scikit-learn
# 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
uv pip install flash-attn --no-build-isolation
# install plotly matplotlib (already installed above)
echo "All dependencies installed successfully!"