Select from Multiple GPU Devices
By default, Question Answering enhanced mode only supports a single device set as GPU 0. If GPU 1 or more exist because multiple CUDA capable GPUs are installed and you would like to change the default GPU in Sintelix, select your operating system below for instructions.
Ubuntu Instructions
To select a different GPU device for Ubuntu:
-
Run nvidia-smi to view installed GPUs:
nvidia-smi -L
You should see a list of all installed GPUs:
-
Copy the UUID of the CUDA device you want to use. For example: GPU-7cccd4d4-4553-bd42-43bd-e8c744b42265.
-
Under
/usr/share/tomcat9/bin
, create the filesetenv.sh
.sudo touch /usr/share/tomcat9/bin/setenv.sh
-
Add the following line to setenv.sh and save:
export CUDA_VISIBLE_DEVICES={UUID}
-
Replace {UUID} withe UUID copied in step 2.
-
Set executable right for setenv.sh:
sudo chmod +x /usr/share/tomcat9/bin/setenv.sh
-
Restart Tomcat:
sudo systemctl restart tomcat9.service
-
Confirm the device change has been successful:
CentOS Instructions
To select a different GPU device for CentOS:
-
Run nvidia-smi to view installed GPUs:
nvidia-smi -L
You should see a list of all installed GPUs:
-
Copy the UUID of the CUDA device you want to use. For example: GPU-7cccd4d4-4553-bd42-43bd-e8c744b42265.
-
Under
/usr/local/tomcat9/bin
, create the filesetenv.sh
.sudo touch /usr/local/tomcat9/bin/setenv.sh
-
Add the following line to setenv.sh and save:
export CUDA_VISIBLE_DEVICES={UUID}
-
Replace {UUID} with UUID copied in step 2.
-
Set executable right for setenv.sh:
sudo chmod +x /usr/local/tomcat9/bin/setenv.sh
-
Restart Tomcat:
sudo systemctl restart tomcat9.service
-
Confirm the device change has been successful: