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 enforce 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 module (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 Data Science 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

If you used the DEEP Data Science template to develop your code, a template of this repo should have been created alongside the template of your code.

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

  • Dockerfile

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

    If you are adding a service derived from an existing module, it is good practice to draw inspiration from the Dockerfiles of the module or the services derived from that module (see 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 (PR)

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 catalog repo (deephdc/deep-oc) and add your Docker repo name at the end of the MODULES.yml.

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

You can also make it online on GitHub.

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