Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


When you want to run Docker containers on the Fidis/Gacrux cluster

Warning

We are still in beta phase. The installation will soon be improved with:

  • automatic account creation on the registry

The present documentation will be updated once the registry has been modified.


Step-by-step guide


Prerequisite

You need to have Docker installed on your machine and a local docker image.

To see the images available on your machine, use the command


docker images


Account on the c4science registry

Set up your machine

  • Login on the registry from your local Docker installation

    $ docker login registry.c4science.ch
    Username (username): username
    Password:
    Login Succeeded

Upload a Docker image to the registry

  • On the web interface, create a Project on the registry (private or public)
  • Tag the image you want to upload on your local machine and push it to the registry

    $ docker tag alpine:latest registry.c4science.ch/yourproject/alpine:latest
    $ docker push registry.c4science.ch/yourproject/alpine:latest

Pull an image on Shifter and specify a user or group ACL

  • From the frontend, pull the image

    $ shifterimg login
    default username: username
    default password:
    $ shifterimg pull yourproject/alpine:latest
    $ shifterimg images
    tcm        docker     READY    9797e5e798   2018-03-15T16:00:59 yourproject/alpine:latest

  • You can specify an LDAP one or multiple (separated by a comma) username and/or group so the image is only available to those people

    $ id
    $ shifterimg --group scitas-ge --user aubort,user2 pull yourproject/alpine

  • To update the user/group ACL you can re-run the pull command
  • To view the full info about the images (warning: JSON):

    $ shifterimg -v images
    tcm        docker     READY    9797e5e798   2018-03-15T16:00:59 yourproject/alpine:latest

Run the image

You can submit the following Slurm script with the sbatch command

#!/bin/bash -l
 
#SBATCH --nodes 1
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 1
#SBATCH --mem 1024
#SBATCH --image yourproject/alpine
 
sleep 10
 
shifter ls /etc
 
sleep 10

 



  • No labels