Reference
Working Locally

Working locally with your code

When coding up against the numerous platform with numerous JobClient (opens in a new tab) or numerous Image Tools (opens in a new tab) you can connect and run your jobs locally while still getting the results on the platform.


The following guide is going to show how to implement the local workflow using the numerous CLI (opens in a new tab).

Prerequisites

  • tool with a job
  • a scenario connected to the tool. See the Getting Started Guide
  • your python code that uses either the JobClient or Image Tools

Getting up and running

In the root of your repository run the following. You don't need to have git initiated in the repository.

terminal
pip install numerous.sdk
terminal
numerous init

The following command you need to copy from the scenario page. Go to the scenario page and click the play button (▶). Click the "Edit job code"-button. From the dialog you copy the numerous config line:

terminal
numerous config --remote https://app-api.numerous.com/< replace >

From the "Edit job code"-dialog copy the numerous checkout line:

terminal
numerous checkout --scenario < replace >

Resetting to connection to numerous

If you want to reset the connection to numerous, for instance if you want to connect to a different scenario, you do this by deleting the .numerous.repository.json -file in your code repository.

Running init and going through the steps above will connect you to numerous again.

Alternatively you can edit the .numerous.repository.json -file with the data in the "Edit job code"-dialog.

Building your code

To push and build your code you need a docker file. To get your code running on numerous, check working with containers.


CLI reference

You can see the complete reference here, numerous CLI (opens in a new tab), or by running numerous --help.

numerous init

terminal
numerous init

Initialises the repository by creating the .numerous.repository.json -file.

numerous config

terminal
numerous config --remote https://app-api.numerous.com/< replace >

Adds the remote URL to the .numerous.repository.json -file. This refers to the api-server that the CLI talks to.

numerous checkout

terminal
numerous checkout --scenario < replace >

The numerous config command does 3 things:

  1. it adds information about the scenario you want to connect to to the .numerous.repository.json -file.
  2. it logs you in to the platform by requesting the email and password credentials you signes up with.
  3. it clones the remote repository if you have already pushed code to it

numerous push

terminal
numerous push -c "push message"

This command pushes the code in your repository to the numerous platform.

numerous build

terminal
numerous build

Builds your code in the remote repository. This is based on the docker-file you have specified. See working with containers.

numerous clone

terminal
numerous clone

Clones the remote repository to the local repository.