Add you model/service to the DEEP marketplace

This document describes how to add your trained service or model to the DEEP marketplace.

Creating the Github repositories

You model must have a repository to host the code and a repository to host the Dockerfiles. Both these repositories can he hosted under your personal Github account. Naming conventions are that the Docker repo name is the same as the code repo name with the prefix DEEP-OC-.

A typical example of this can be:

In case you are only developing a service based on an already existing model (like for example developing an animal classifier based on the image-classification-tf module) you only need to create the Docker repo.

The code repo

This is the repo containing the code of your model. If you are adding a service (ie. a trained model) the weights of the trained model must be stored in a location accessible over a network connection, so that your container can download them upon creation. A few MUSTs your code has to comply with in order to ensure compatibility and ease of use:

  • your code must be packaged in order to be pip installable. This should be the default behaviour if you used the DEEP cookiecutter template to develop your code.
  • your code must be integrated with the DEEPaaS API. Check this guide on how to do this.

The Docker repo

This repo has to contain at least the following files (see the Generic container for a template):

  • Dockerfile

    This is the file to build a container from your application. If you developed your application from the DEEP cookiecutter template you should have a draft of this file under the ./docker folder (although you might need to add additional code depending on the requirements of your model).

    If you are adding a service instead of a model, it is good practice to draw inspiration from the Dockerfiles of other services derived from the same model (for example the plant classification Dockerfile derived from the image classification model).

    Some steps common to all Dockerfiles include cloning the model code repo, pip installing the DEEPaaS API, installing rclone and downloading the trained weights if you are adding a service. For the details of all these steps please refer to this Dockerfile example.

  • Jenkinsfile

    This is the file that runs the Jenkins pipeline. You can copy this Jenkinsfile example replacing the repo names with your own Docker repo name.

  • metadata.json

    This file contains the information that is going to be displayed in the Marketplace. You can build your own starting from this metadata.json example This metadata will be validated during integration tests when the PR is accepted but you can manually validate the metadata beforehand by running:

    pip install git+
    deep-app-schema-validator metadata.json

Making the Pull Request

Once your repos are set it’s time to make a PR to add your model to the marketplace! For this you have to fork the code of the DEEP marketplace (deephdc/ and add your Docker repo name at the end of the project_apps.yml file in the pelican branch.

git clone -b pelican[my-github-fork]
cd [my-github-fork]
echo '- module:[my-account-name]/DEEP-OC-[my-app-name]' >> project_apps.yml
git commit -a -m "adding new module to the catalogue"
git push

Once the changes are done, make a PR of your fork to the original repo (again to the pelican branch) and wait for approval. Check the GitHub Standard Fork & Pull Request Workflow in case of doubt.