Linux

Install neurodesktop on Linux

Minimum System Requirements

  1. At least 3GB free space for neurodesktop base image
  2. Docker requirements. Details found under https://docs.docker.com/get-docker/

Quickstart

1. Install Docker

Install Docker from here: https://docs.docker.com/get-docker/. Additional information available below

2. Run Neurodesktop

Before the first run, create a local folder where the downloaded applications will be stored, e.g. ~/neurodesktop-storage

Then use one of the following options to run Neurodesktop:

Option 1: NeuroDesktop.run

Download and run the following executable https://github.com/NeuroDesk/neurodesktop/raw/main/Linux_run_Neurodesk/NeuroDesktop.run

Option 2: Using Terminal

  1. Open a terminal, and type the folowing command to automatically download the neurodesktop container and run it
sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
  -p 8080:8080 \
  -h neurodesktop-20220329 vnmd/neurodesktop:20220329
  1. Once neurodesktop is downloaded i.e. guacd[77]: INFO: Listening on host 127.0.0.1, port 4822 is displayed in terminal, leave the terminal open and neurodesktop running (i.e., do not press CTRL+C)

  2. Open a browser and go to:

http://localhost:8080/#/?username=user&password=password
  1. Press on “Desktop Auto-Resolution” under “ALL CONNECTIONS”

  2. If it is the first time you use Neruodesktop, wait until the desktop appears (it may take a few seconds). Otherwise, it should appear instantaneously.

  3. Neurodesk is ready to use! Click “What’s next?” on the left of this page for further instructions.

  4. For an optimal experience, switch your browser to full-screen mode by following the instructions for your browser here: https://www.thewindowsclub.com/open-chrome-edge-or-firefox-browser-in-full-screen-mode

Deleting neurodesktop:

When done processing your data it is important to stop and remove the container - otherwise the next start or container update will give an error ("… The container name “/neurodesktop” is already in use…")

  1. Click on the terminal from which you ran neurodesktop

  2. Press Ctrl-C

  3. Run:

docker stop neurodesktop
  1. Run:
docker rm neurodesktop

Installing Docker

For general installation instructions, refer to https://docs.docker.com/get-docker/

RHEL/CentOS (yum-based)

Refer to https://docs.docker.com/engine/install/centos/

One example to install docker in a yum-based distribution could look like this:

sudo dnf install -y yum-utils 
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
# or if dnf not found: sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl enable docker
sudo systemctl start docker
sudo docker version
sudo docker info
sudo groupadd docker
sudo usermod -aG docker $USER
sudo chown root:docker /var/run/docker.sock
newgrp docker

Ubuntu/Debian (apt-based)

Refer to https://docs.docker.com/engine/install/ubuntu/

One example to install docker in a apt-based distribution could look like this:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

GPU support

RHEL/CentOS (yum-based)

sudo yum install nvidia-container-toolkit -y

Running neurodesktop container with GPU

sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)" \
  -e NVIDIA_VISIBLE_DEVICES=all \
  -e NVIDIA_DISABLE_REQUIRE=1 \
  -p 8080:8080 -h neurodesktop-20220329 \
  vnmd/neurodesktop:20220329

Then inside the neurodesktop container run:


sudo apt update
sudo apt install libcudart10.1

For a GPU with Nvidia driver Version > 495.29.05:


wget https://developer.download.nvidia.com/compute/cuda/11.5.0/local_installers/cuda_11.5.0_495.29.05_linux.run
sudo sh ./cuda_11.5.0_495.29.05_linux.run

Running tensorflow (w/ GPU)

Using tensorflow (python)

conda install tensorflow-gpu
python
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

image

Using tensorflow (singularity container in neurodesktop)
singularity pull docker://tensorflow/tensorflow:latest-gpu
singularity run --nv tensorflow_latest-gpu.sif
python
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

image

Using an RDP Client

Startup Neurodesktop using the following command:

sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
  -p 8080:8080 -p 3390:3389 \
  -h neurodesktop-20220329 vnmd/neurodesktop:20220329

Open your RDP client and connect to Computer localhost:3390

Use the following details to login if prompted

username: user
password: password

Using VNC

To enable VNC and disable RDP, startup Neurodesktop using the following command:

sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
  -p 8080:8080 \
  -h neurodesktop-20220329 vnmd/neurodesktop:20220329 --vnc

To enable both VNC and RDP, startup Neurodesktop using the following command:

sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
  -p 8080:8080 \
  -h neurodesktop-20220329 vnmd/neurodesktop:20220329 --vnc --rdp

Using a VNC Client

Startup Neurodesktop using the following command:

sudo docker run \
  --shm-size=1gb -it --privileged --name neurodesktop \
  -v ~/neurodesktop-storage:/neurodesktop-storage \
  -e HOST_UID="$(id -u)" -e HOST_GID="$(id -g)"\
  -p 8080:8080 -p 5901:5901 \
  -h neurodesktop-20220329 vnmd/neurodesktop:20220329 --vnc

Open a VNC Client and connect to port 5901

Last modified April 21, 2022 : added yum option (4e468d6b)