Python ๐ App / Script
First launch a Ubuntu Terminal job connected to your UCloud folder.
Parameters
๐ See also PythonAppJobParameters.json template.
Usage
-
Once the Ubuntu Terminal job has started, click on the Open interface blue button in the top right corner.
-
Navigate to the ucloud folder
cd /work/{your-working-folder}/ucloud
. -
Then launch the script with
. main.sh
. -
Now your skeleton should look like this ๐
/work/{your-working-folder}/ โโโ data/ โโโ database/ โโโ env/ โโโ install/ โโโ jobs/ โโโ ucloud/ โโโ main.sh โโโ {your-gh-repo}/ โโโ main.py
-
In case you app process data, do not forget to load files in the
data
folder. -
Then follow instructions starting after Do you want to run your Python app question.
Your cloned GitHub repository must have a main.py
file at its root level to be identified as a valid Python ๐ app.
Environment variables
Available environment variables created in UCloud job to interact within Django app.
import os
...
UCLD_PATH_TO_DATA = os.environ.get("UCLD_PATH_TO_DATA", "")
Sponsorship
If this project helps you, you can offer me a cup of coffee โ๏ธ :-)