Python algoritms
Python methods can be implemented compiling the ccpimage field with a standard python docker image (es python:3.9.19
)
We can then define an input repository
field
and configure the deploy script to git clone the repository and install the dependencies, using the placeholder {{repository}}
to refer the input repository field
git clone {{repository}} repo
pip install -r requirements.txt
then the run script will run it passing the required parameters
cd repo
python myapp.py
resulting in the json
{
"additionalParameters": {
"parameters": [
{
"name": "deploy-script",
"value": [
"git clone {{repository}} repo" ,
"pip install -r requirements.txt"
]
},
{
"name": "execute-script",
"value": [
"cd repo",
"python myapp.py"
]
}
]
},
}
example: WordCloud