Download example code

The next step toward deploying your algorithm is to prepare a code base that Docker can use to build a container. To help you, there is example code available to start from. There are two options:

Option 1: Clone a repository from a challenge baseline algorithm
Choose this if you are participating in a challenge and the organizers have made a baseline repository available. The baseline algorithm will be a working example of how to load the input(s) and produce an output. It will therefore be the best starting point. If there is no baseline algorithm available, you can still use option 2 below and download a tailored template after creating your algorithm page.

Option 2: Download your algorithm image template
Choose this method if you are not participating in a challenge or if there is no baseline algorithm available. The template is tailored to your algorithms interface, so set these up first. The code shows how to easily read and write your output, and includes helper scripts for Docker containerisation.

Option 1: Clone a repository from a challenge baseline algorithm

As Challenge repositories need to be private, we cannot simply fork the baseline repository, because GitHub doesn't allow it. Instead we must clone the baseline, push it to our repository, and clone that repo. Below we outline the steps to this, which we adapted from the Github docs.

First, make sure to have git and git-lfs installed on your local computer, and create a  Github account, if you have not already done so.

On GitHub, start by creating a new repository and set it to private. We will call it your-repo, but pick a name you like. Next, clone the baseline repository in your local bash terminal by running the following commands – but be sure to replace  path/to/home with your desired home path, and replace the URL with the URL of the actual baseline repository + .git.

$ cd /path/to/home
$ git clone --bare https://github.com/ChallengeOrganizer/algorithm-baseline.git

Then go to the baseline repository folder, push it to your-repo , and (optionally) delete the original:

$ cd algorithm-baseline.git
$ git push --mirror https://github.com/YourUsername/your-repo.git
$ cd ..
$ rm -rf algorithm-baseline.git

Then finally, clone your own repository:

$ git clone https://github.com/YourUsername/your-repo.git

Option 2: Download your algorithm image template

Ensure the interfaces are set up before you continue.

After setting up the interface(s), algorithm editors can find the templates via Templates ⟶ Download Algorithm Image Template: