Statistical Algorithms Importer: Docker Support

From Gcube Wiki
Revision as of 09:48, 22 September 2020 by Giancarlo.panichi (Talk | contribs) (Created page with "{| align="right" ||__TOC__ |} This page explains how to create and run docker images on the D4Science infrastructure through the DataMiner service and the algorithms develop...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page explains how to create and run docker images on the D4Science infrastructure through the DataMiner service and the algorithms developed with the Statistical Algorithms Importer (SAI). Currently for this purpose there is the Docker Image Executor algorithm.

Docker Image Executor

The Docker Image Executor algorithm is already present and accessible on the D4Science infrastructure:

File:DockerImageExecutor.png
Docker Image Executor, Docker Support

This algorithm allows you to retrieve the image that you intend to run on the D4Science Swarm cluster from a Docker Hub repository. So to run the algorithm the user must indicate:

  • Image, the name of the repository (e.g. d4science/sortapp)
  • CommandName, the name of the command to invoke when the service is started (e.g. sortapp)
  • FileParam, a file present in the user's workspace to be passed as an input parameter along with the run command (e.g.)

This algorithm will take care of retrieving the user token and passing the parameters to the docker service in this format:

<command-name> <token> <file-item-id> <temp-dir-item-id>

In addition to passing the token and the input file, the algorithm also passes the id of the temporary folder that was created on the StorageHub service to contain the computation results. The service created from the chosen image will be responsible for saving the data of its own computation in the folder indicated by the algorithm interacting with the StorageHub service. When the execution of the docker service is finished, that is, it will have created the results and saved on the temporary folder, then the Docker Image Executor algorithm will take care of returning the result as a zip file of the temporary folder.