Part 1 — Hello world! [From your Python script to Supervisely APP]
In this part, we will show you how you can turn any Python code into a Supervisely application
Table of contents
Step 1 — Python code
Let's start with a simple python code.
src/main.py
Step 2 — Configuration file
Config file. We. Need. It. To add a Python application to Supervisely, let's create a configuration file for it. An example of a config file:
config.json
docker_image
— SDK version you were using, it doesn't matter in this appmain_script
— path from repositoryroot
tomain.py
(entry point)
Step 3 — Repository setup
In this step, we create a repository and add our code to it.
1. Generate new personal token
Open GitHub → Settings → Developer settings → Personal access tokens
Click Generate new token
Select "repo" access scope and click "Generate token" button. Save generated token — you will need it later.
2. Create GitHub repository
Let's create a new GitHub repository that we will use to deploy a new Supervisely application. Create a new private GitHub repository:
3. Push app to repository
Make sure you have collected all the required files:
src/main.py
config.json
Then just push files to git:
Step 4 — Add app to Supervisely
We've almost reached the finish line! It remains to add the application to the Ecosystem.
1. Go to the Private Apps section
2. Add your application
In the
Github repository URL
field, specify the link to the directory containing the application'sconfig.json
In the
GitHub personal access token
field, paste your token that you saved instep 1
Step 5 — Results
Last updated