Unverified Commit 04052631 authored by Matthew Douglas's avatar Matthew Douglas Committed by GitHub
Browse files

Add CUDA 12.4 to docs/install helper (#1136)

* Add CUDA 12.4 download to utility script, docs

* (ci) Add CUDA 12.4.0 build to workflow

* Apply ruff format to install_cuda.py
parent 5b356245
...@@ -84,7 +84,7 @@ Then locally install the CUDA version you need with this script from bitsandbyte ...@@ -84,7 +84,7 @@ Then locally install the CUDA version you need with this script from bitsandbyte
```bash ```bash
wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh
# Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH # Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123} # CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 124}
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True # EXPORT_TO_BASH in {0, 1} with 0=False and 1=True
# For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc # For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc
......
...@@ -17,6 +17,7 @@ cuda_versions = { ...@@ -17,6 +17,7 @@ cuda_versions = {
"121": "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run", "121": "https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run",
"122": "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run", "122": "https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run",
"123": "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run", "123": "https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run",
"124": "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run",
} }
...@@ -76,7 +77,9 @@ def main(): ...@@ -76,7 +77,9 @@ def main():
download_path = "/tmp" # default download path download_path = "/tmp" # default download path
if len(sys.argv) < 2: if len(sys.argv) < 2:
print("Usage: python install_cuda.py <version/all> [user/system] [download_path]") print(
"Usage: python install_cuda.py <version/all> [user/system] [download_path]"
)
sys.exit(1) sys.exit(1)
version = sys.argv[1] version = sys.argv[1]
...@@ -97,7 +100,9 @@ def main(): ...@@ -97,7 +100,9 @@ def main():
elif version in cuda_versions: elif version in cuda_versions:
install_cuda(version, base_path, download_path) install_cuda(version, base_path, download_path)
else: else:
print(f"Invalid CUDA version: {version}. Available versions are: {', '.join(cuda_versions.keys())}") print(
f"Invalid CUDA version: {version}. Available versions are: {', '.join(cuda_versions.keys())}"
)
sys.exit(1) sys.exit(1)
......
...@@ -11,7 +11,7 @@ URL120=https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installer ...@@ -11,7 +11,7 @@ URL120=https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installer
URL121=https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run URL121=https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_530.30.02_linux.run
URL122=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run URL122=https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda_12.2.2_535.104.05_linux.run
URL123=https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run URL123=https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
URL124=https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
CUDA_VERSION=$1 CUDA_VERSION=$1
BASE_PATH=$2 BASE_PATH=$2
...@@ -57,8 +57,11 @@ if [[ -n "$CUDA_VERSION" ]]; then ...@@ -57,8 +57,11 @@ if [[ -n "$CUDA_VERSION" ]]; then
elif [[ "$CUDA_VERSION" -eq "123" ]]; then elif [[ "$CUDA_VERSION" -eq "123" ]]; then
URL=$URL123 URL=$URL123
FOLDER=cuda-12.3 FOLDER=cuda-12.3
elif [[ "$CUDA_VERSION" -eq "124" ]]; then
URL=$URL124
FOLDER=cuda-12.4
else else
echo "argument error: No cuda version passed as input. Choose among versions 92 to 123" echo "argument error: No cuda version passed as input. Choose among versions 110 to 124"
fi fi
else else
echo "argument error: No cuda version passed as input. Choose among versions 92 to 123" echo "argument error: No cuda version passed as input. Choose among versions 92 to 123"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment