NewJobSubmit

A job has the following mandatory and optional fields.

Limitations

A container needs bash and shadow (useradd, groupadd, ...) packages to be available in container. Busybox based containers will not work (except if they have bash and shadow packages pre-installed). For Alpine, software will try to install them in the container.

Mandatory fields

Name: simple text describing the job

Interactive session: boolean to request an interactive access (SSH) to the container. If openssh server is not available in container, the software will try to install it (startup will be longer). User can login to the container with the SSH Key defined in his preferences or via his login and API Key. An interactive job will never end, user need to kill the job when access is not needed anymore.

Container image: this is the Docker image name (the one used with a docker pull). If access is restricted to a specific private registry, one does not need to prefix with the registry name (though it is accepted).

Command: this is the script to execute in the container. It can be any script (bash, python, ..) with a shebang (#!/bin/bash) as long as provided shebang is available in container. Some environement variables are available in script for contextualization:

                GODOCKER_JID: Job identifier
                GODOCKER_PWD: Job directory, container will execute script in this directory. Script can write results in this directory.
                GODOCKER_HOME: mount path for user home directory (if selected in volumes)
                GODOCKER_DATA: personal storage (read only)

CPU: number of CPUs needed for the job.

RAM: quantity of memory reserved for the job (in Gigabytes).

GPUS: number of GPU (int, not float) needed for the job

Optional fields

Description: longer description of what the job does

Tags: list of text tags to ease jobs categorization/filtering, can be used to kill all jobs with a specific tag

Project: if not defined, will use default project. Projects can be created by the administrator to get access to specific volumes (directories) in the container or to have different quotas/priorities for a group of users.

Notifications: request to get emails at each container life cycle (switch to running, over).

Parent jobs ids: list of other job identifiers. Current job will start only when all those jobs are over.

Job arrays: execute N instances of the same job. Each job will provide in script some environment variables

                 GODOCKER_TASK_ID: Job array task identifier
                 GODOCKER_TASK_FIRST: First job array task identifier
                 GODOCKER_TASK_LAST: Last job array task identifier
                 GODOCKER_TASK_STEP: steps in job array identifiers

                 Syntax: start:end:step

                  Example:  1:9:2  starts at id 1 up to 9, with an increment of 2 => 1,3,5,7,9


Data: free text that will be available in $GODOCKER_PWD/godocker-uris.txt file

Ports: list of ports to open in the container. Each port in the list will be mapped to an available port (port 80 will for example be mapped to port 30021). List of ports and their mapping are available in job details once switched to running.

Restart policy: number of times the job should be restarted in case of a node failure during the job execution (node crash for example).

Mount volumes: list of volumes (directories) to be available in the container. The home volume has a specific mount point ($GODOCKER_HOME). The mount point of volumes are available in job details.

Run as root: if allowed in configuration, user can request root access in the container (to install packages for example). If root is selected, all selected volumes are mount in read-only mode.

Constraints: it is possible to select some constraint to place the job on specific nodes (nodes with GPUs for example). A constraint can be selected multiple times (to request a node with 2 GPUs).