Skip to content

Latest commit

 

History

History
104 lines (92 loc) · 3.76 KB

File metadata and controls

104 lines (92 loc) · 3.76 KB

Prerequisites

Get an OSC account

See the email from Kate.

Install Singularity

An unprivileged user is not allowed to build a container image on any OSC login or computing node. To continue hands-on exercises, please install Singularity on your laptop. If you have any difficulty in performing this installation, you can use remote-build through Singularity on OSC clusters after signing up Sylabs Cloud Services. However it is more complicated to put your local files into a container.

Install on Linux

For Linux users, you can follow the installation instruction from Singularity user guide or this one from Singularity source code.

Here is my quick install note

# Install system dependencies
$ sudo apt-get update 
$ sudo apt-get install -y build-essential libssl-dev \
  uuid-dev libgpgme11-dev squashfs-tools libseccomp-dev

# Install Go
$ cd /tmp
$ wget https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz
$ sudo tar xf go1.12.5.linux-amd64.tar.gz -C /usr/local

# Install Singluarity
$ mkdir -p $HOME/go/src/github.com/sylabs
$ cd $HOME/go/src/github.com/sylabs
$ wget https://github.com/sylabs/singularity/releases/download/v3.1.1/singularity-3.1.1.tar.gz
$ tar xf singularity-3.1.1.tar.gz
$ cd singularity
$ ./mconfig
$ cd builddir
$ PATH=/usr/local/go/bin:$PATH make
$ sudo make install

Install on macOS or Windows

For macOS and Windows users, you can use Vagrant boxes mantained by Sylabs. Please download and install VirtualBox, Vagrant and Vagrant Manager before you proceed.

Create and enter a project directory to be used with your Vagrant VM in a terminal

$ mkdir singularity && cd singularity

Pick one Vagrant box and set up the VM

$ vagrant init sylabs/singularity-3.4-ubuntu-bionic64 && vagrant up

Start the VM

$ cd singularity
$ vagrant ssh
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-45-generic x86_64)
vagrant@vagrant:~$ singularity version
3.4.0-1

By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant. Inside the VM,

vagrant@vagrant:~$ ls /vagrant
Vagrantfile

Shutdown a Vagrant box when you don't need it

$ cd singularity
$ vagrant halt

The step-by-step instruction can be found in Singularity user guide.

If you have difficulty in the install above, you can download a Ubuntu-based virtual machine image with pre-installed Singularity from here (size: 3.5 GB) and follow this instruction to import a VM to an applicane.

Sylabs Cloud Services

With Sylabs Cloud services, one can push, share, sign and verify a container image. To use these features with images, you must first generate an access token to the Sylabs Cloud

  1. Go to https://cloud.sylabs.io/
  2. Click Sign in to Sylabs and follow the sign in steps.
  3. Click on your login id (same and updated button as the Sign in one).
  4. Select Access Tokens from the drop down menu.
  5. Click the Manage my API tokens button from the "Account Management" page.
  6. Click Create.
  7. Click Copy token to Clipboard from the New API Token page.
  8. Paste the token string into your ~/.singularity/sylabs-token file (you might need to create ~/.singularity directory first)
  9. Run singularity remote login SylabsCloud and paste the token to verify login.