HowTo: Install GPU drivers via initial scripts
This document explains how to install GPU drivers through initial scripts when creating a VCS instance using the TWSC Portal.
The initial scripts feature only applies to Linux-based solutions.
See this document to create a VCS instance. Please remember to select a Linux-based solution when creating it.
Please visit the official NVIDIA website, select the following information, and click Search to find the suitable driver version.
- Product Type:Data Center / Tesla
- Product Serires:V-Series
- Product:Tesla V100
- Operating System:Linux 64-bit
- CUDA Toolkit:Select according to your needs
- Language:Select according to your needs
- Obtain the desired driver version for installation.
- Based on the OS you use, replace the previously obtained driver version in the following command, and enter the command on the INITIAL SCRIPTS tab. (using NVIDIA-Linux-x86_64-550.90.07 as an example):
- Ubuntu
- CentOS
- Rocky
echo "blacklist nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf && echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf && sudo update-initramfs -u && sudo modprobe -r nouveau && sudo modprobe nouveau && sudo apt-get update && sudo apt-get install libc-dev -y && sudo apt-get install linux-headers-$(uname -r) -y && wget https://tw.download.nvidia.com/tesla/550.90.07/NVIDIA-Linux-x86_64-550.90.07.run && sudo sh NVIDIA-Linux-x86_64-550.90.07.run --accept-license --no-questions --dkms -s
echo "blacklist nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf && echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf && sudo dracut --force && sudo yum update -y && sudo yum install glibc-devel wget gcc -y && sudo yum install kernel-devel-$(uname -r) -y && wget https://tw.download.nvidia.com/tesla/550.90.07/NVIDIA-Linux-x86_64-550.90.07.run && sudo sh NVIDIA-Linux-x86_64-550.90.07.run --accept-license --no-questions --dkms -s
echo "blacklist nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf && echo "options nouveau modeset=0" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf && sudo dracut --force && sudo yum update -y && sudo yum install glibc-devel wget gcc -y && sudo yum install kernel-devel-$(uname -r) -y && wget https://tw.download.nvidia.com/tesla/550.90.07/NVIDIA-Linux-x86_64-550.90.07.run && sudo sh NVIDIA-Linux-x86_64-550.90.07.run --accept-license --no-questions --dkms -s
- To confirm whether the installation was successful, wait until your VCS instance turns to the
Ready
state. Then, connect to your VCS instance, and enter the following command.
nvidia-smi
- If the GPU driver has been successfully installed, you will see the following screen. (The below example uses Ubuntu to install NVIDIA-Linux-x86_64-525.105.17)
The above example is based on installing NVIDIA-Linux-x86_64-525.105.17. You can choose the appropriate GPU driver version according to your needs. Please refer to the NVIDIA official website for more information and modify the driver version accordingly.
- You can review your initial scripts on the REVIEW & CREATE tab.
This feature only supports single-line commands. If you have multiple commands, we recommend that you edit them in advance and separate them using ';', '&', or '|'. Please also ensure that the total length of the commands does not exceed 2048 characters.
Other examples
Install docker via initial scripts
- On the INITIAL SCRIPTS tab, enter the following command.
curl -fsSL get.docker.com | bash
- To confirm whether the installation was successful, wait until your VCS instance turns to the
Ready
state. Then, connect to your VCS instance, and enter the following command.
sudo docker ps -a
- If the intallation was successful, you will see the following screen.