Start Workspace based in https://github.com/cloud-native-robotz-hackathon/starter-app-python.git
F1 -> Tasks: Run Task -> devfile -> devfile: “Run the application"
Install requirements
$ python -m venv ~/.venv/
$ source ~/.venv/bin/activate
$ cd starter-app-python
$ pip install -r requirements.txt
$ gunicorn -b 0.0.0.0:8080 app --reload
Install the required packages
$ cd starter-app-python
$ pip install -r requirements.txt
$ gunicorn -b 0.0.0.0:8080 app --reload
In the config.py set to following variables
ROBOT_API
= URL of the robot REST ApiAPI_TOKEN
= The token fo your robot/teamINFERENCING_API
= The Url of the object detection inferencing service
To run this application on your local host:
$ gunicorn -b 0.0.0.0:8080 app --reload
To interact with your booster while it's running locally, you can either open the page at http://localhost:5000
or use the curl
command:
$ curl http://localhost:8080/status
$ curl -X POST http://localhost:8080/run
To update your application:
Changing python files will automatically reload the application. For chnages in static files (*.html) you will have to restart the app
The app is prepared with a S2I configuration. You can directly create a pipeline from this repo in the OpenSHift Developer View.