This script automates the installation process of NVIDIA drivers and CUDA toolkit on Ubuntu/Debian systems. It provides a user-friendly interface with colored output, automatic system updates, and verification steps to ensure successful installation. The script includes features like auto-update, installation verification, and optional system reboot.
Script này tự động hóa quá trình cài đặt driver NVIDIA và CUDA toolkit trên các hệ thống Ubuntu/Debian. Cung cấp giao diện thân thiện với người dùng thông qua các thông báo màu sắc, tự động cập nhật hệ thống và các bước xác minh để đảm bảo cài đặt thành công. Script bao gồm các tính năng như tự động cập nhật, kiểm tra cài đặt và tùy chọn khởi động lại hệ thống.
- Automatic system updates before installation
- Installation verification
- Colored output for better progress tracking
- Automatic CUDA environment variables configuration
- Optional reboot after installation
- Auto-update functionality for the script itself
# Download script from GitHub
wget https://raw.githubusercontent.com/fat-beo/script-nvidia-smi/main/script-nvidia-smi.sh
# Make script executable
chmod +x script-nvidia-smi.sh- Run the script with sudo:
sudo ./script-nvidia-smi.sh- Choose one of the following options:
1: Auto Driver Installation (Recommended)2: Manual Driver Installation (You need to know the driver name, e.g., nvidia-driver-535)3: Install CUDA Toolkit
- Root privileges are required to run the script
- After driver installation, you can choose whether to reboot immediately
- For CUDA Toolkit, the script will automatically add environment variables to ~/.bashrc
- Tự động cập nhật hệ thống trước khi cài đặt
- Kiểm tra và xác minh cài đặt
- Hiển thị thông báo màu sắc để dễ theo dõi tiến trình
- Tự động cấu hình biến môi trường CUDA
- Tùy chọn khởi động lại sau khi cài đặt
- Tự động cập nhật script khi có phiên bản mới
# Tải script từ GitHub
wget https://raw.githubusercontent.com/fat-beo/script-nvidia-smi/main/script-nvidia-smi.sh
# Cấp quyền thực thi cho script
chmod +x script-nvidia-smi.sh- Chạy script với quyền sudo:
sudo ./script-nvidia-smi.sh- Chọn một trong các tùy chọn sau:
1: Cài đặt driver tự động (Khuyến nghị)2: Cài đặt driver thủ công (Bạn cần biết tên driver, ví dụ: nvidia-driver-535)3: Cài đặt CUDA Toolkit
- Script yêu cầu quyền root để chạy
- Sau khi cài đặt driver, bạn có thể chọn có khởi động lại ngay hay không
- Đối với CUDA Toolkit, script sẽ tự động thêm các biến môi trường vào ~/.bashrc