Select from Multiple GPU Devices

This topic is only applicable if you have multiple Nvidia CUDA GPUs installed on your system and would like to select a GPU other than the current default GPU.

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:

  1. Run nvidia-smi to view installed GPUs:

    nvidia-smi -L

    You should see a list of all installed GPUs:

  2. Copy the UUID of the CUDA device you want to use. For example: GPU-7cccd4d4-4553-bd42-43bd-e8c744b42265.

  3. Under /usr/share/tomcat9/bin, create the file setenv.sh.

    sudo touch /usr/share/tomcat9/bin/setenv.sh
  4. Add the following line to setenv.sh and save:

    export CUDA_VISIBLE_DEVICES={UUID}
  5. Replace {UUID} withe UUID copied in step 2.

  6. Set executable right for setenv.sh:

    sudo chmod +x /usr/share/tomcat9/bin/setenv.sh
  7. Restart Tomcat:

    sudo systemctl restart tomcat9.service
  8. Confirm the device change has been successful:

    1. Log in to Sintelix as an administrator.

    2. Go to Admin > System Settings > Question Answering General Settings.

    3. Confirm the GPU you selected appears in the Device table as GPU(0).

 


CentOS Instructions

To select a different GPU device for CentOS:

  1. Run nvidia-smi to view installed GPUs:

    nvidia-smi -L

    You should see a list of all installed GPUs:

  2. Copy the UUID of the CUDA device you want to use. For example: GPU-7cccd4d4-4553-bd42-43bd-e8c744b42265.

  3. Under /usr/local/tomcat9/bin, create the file setenv.sh.

    sudo touch /usr/local/tomcat9/bin/setenv.sh
  4. Add the following line to setenv.sh and save:

    export CUDA_VISIBLE_DEVICES={UUID}
  5. Replace {UUID} with UUID copied in step 2.

  6. Set executable right for setenv.sh:

    sudo chmod +x /usr/local/tomcat9/bin/setenv.sh
  7. Restart Tomcat:

    sudo systemctl restart tomcat9.service
  8. Confirm the device change has been successful:

    1. Log in to Sintelix as an administrator.

    2. Go to Admin > System Settings > Question Answering General Settings.

    3. Confirm the GPU you selected appears in the Device table as GPU(0).