Install on Linux#

We have tested Tapqir installation on Ubuntu 20.04 and Arch Linux distributions.

  1. Install Nvidia drivers if not already installed.

    On Ubuntu 20.04

    Tip

    On Ubuntu select the text to copy it and then press the middle mouse button (scrolling wheel) to paste the copied text.

    To get information about your graphic card and available drivers run:

    $ ubuntu-drivers devices
    
    // From the output
    vendor   : NVIDIA Corporation
    model    : TU102 [GeForce RTX 2080 Ti]
    driver   : nvidia-driver-470 - distro non-free recommended
    

    Install the recommended nvidia driver (in this case nvidia-driver-470):

    $ sudo apt install nvidia-driver-470
    

    On Arch Linux

    Install the nvidia package:

    $ sudo pacman -S nvidia
    
  2. Install g++ (>=7) if not already installed.

    To check installation versions in the terminal run:

    $ g++ --version
    

    To install (if not already installed):

    On Ubuntu 20.04

    In the terminal run:

    $ sudo apt install g++
    

    On Arch Linux

    In the terminal run:

    $ sudo pacman -S gcc
    
  1. Install latest version of CUDA (needs to be version 11.5 or later).

    On Ubuntu 20.04

    Summary of CUDA installation instructions:

    $ sudo apt-key del 7fa2af80
    
    $ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
    
    $ sudo dpkg -i cuda-keyring_1.0-1_all.deb
    
    $ sudo apt-get update
    
    $ sudo apt-get install cuda
    

    Reboot the system:

    $ sudo reboot
    

    On Arch Linux

    In the terminal run:

    $ sudo pacman -S cuda
    

    Reboot the system:

    $ sudo reboot
    
  2. Install Anaconda package manager (Anaconda installation instructions). Here is the summary of required installation steps:

    • Download installer from https://www.anaconda.com/products/individual (anaconda nucleus sign-up page can be ignored).

    • Run the following command to install Anaconda (change the name of the installer file appropriately if it is a newer version):

      $ bash ~/Downloads/Anaconda3-2021.11-Linux-x86_64.sh
      
    • Press Enter at the “In order to continue the installation process, please review the license agreement.” prompt.

    • Scroll to the bottom of the license terms and enter “Yes” to agree.

    • Press Enter to accept the default install location.

    • Type “yes” at “Do you wish the installer to initialize Anaconda3 by running conda init?” prompt.

    • After installation is complete close the terminal and open it again. Now you should see (base) environment indicated in the terminal.

  3. Create a new environment and give it a name (e.g., tapqir-env):

    $ conda create --name tapqir-env python=3.8
    
  4. Activate the environement (you should see the environment name (i.e., tapqir-env) in the command prompt):

    $ conda activate tapqir-env
    
  5. Install tapqir:

    $ pip install tapqir[desktop]
    

Tip

If there are two GPUs on your computer, use:

$ CUDA_VISIBLE_DEVICES=1 tapqir-gui

to run Tapqir on the second GPU.

Update Tapqir#

To update Tapqir run (make sure that tapqir-env environment is activated):

$ pip install tapqir -U

Check version#

To check Tapqir version run:

$ tapqir --version

Install linux server tools (optional)#

Linux machines can be set up to run as servers for batch processing of Tapqir runs. This is optional and requires some linux sysadmin skills. The following are short summary instructions for installing the server tools on Arch Linux.

ssh server#

Install OpenSSH. In /etc/ssh/sshd_config add the following line to allow access only for some users:

AllowUsers    user1 user2

Change the default port from 22 to a random higher one like this:

Port 39901

Start/enable sshd.service.

slurm server#

Follow instructions on Slurm Arch Wiki and Quick Start Administrator Guide. To create Slurm configuration file slurm.conf use the official configurator. Fill in the following options (same control and compute machines):

  • SlurmctldHost - value returned by the hostname -s in bash

  • Compute Machines - values returned by the slurmd -C command

  • StateSaveLocation - change to /var/spool/slurm/slurmctld

  • ProctrackType - select LinuxProc

  • ClusterName - change to the same value as SlurmctldHost

Generate the file and copy it to /etc/slurm-llnl/slurm.conf. Add following lines before COMPUTE NODES:

# GENERAL RESOURCE
GresType=gpu

Add Gres=gpu:x (x is the number of gpu devices) to the NodeName line like this:

NodeName=centaur Gres=gpu:2 CPUs=64 Sockets=1 CoresPerSocket=32 ThreadsPerCore=2 State=UNKNOWN RealMemory=64332

Finally, create /etc/slurm-llnl/gres.conf file by listing all gpu devices:

#################################################################
# Slurm's Generic Resource (GRES) configuration file
##################################################################
# Configure support for our four GPUs
Name=gpu File=/dev/nvidia0 CPUs=0-4
Name=gpu File=/dev/nvidia1 CPUs=5-9

Start/enable slurmd.service and slurmctld.service.

Remote Desktop Server#

Install xrdp package on the Linux server machine. Start/enable xrdp.service and xrdp-sesman.service.

Note

Use remote desktop program (Remmina on Linux) to connect to the computer. At the login screen select xvnc display session.