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.
pip install numerous.sdk
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:
numerous config --remote https://app-api.numerous.com/< replace >
From the "Edit job code"-dialog copy the numerous checkout line:
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
numerous init
Initialises the repository by creating the .numerous.repository.json -file.
numerous config
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
numerous checkout --scenario < replace >
The numerous config
command does 3 things:
- it adds information about the scenario you want to connect to to the .numerous.repository.json -file.
- it logs you in to the platform by requesting the email and password credentials you signes up with.
- it clones the remote repository if you have already pushed code to it
numerous push
numerous push -c "push message"
This command pushes the code in your repository to the numerous platform.
numerous build
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
numerous clone
Clones the remote repository to the local repository.