The Jupyter ProActive Kernel adds a kernel backend to Jupyter. This kernel interfaces directly with the ProActive scheduler and constructs tasks and workflows to execute them on the fly. With this interface, users can run their code locally and test it using a native python kernel, and by a simple switch to ProActive kernel, run it on remote public or private infrastructures without having to modify the code.
This tutorial will show you how to:
1 Install the Jupyter ProActive Kernel
Follow these steps to install the required Python environment:
If you have a Python environment installed on your machine, to be able to install and use the ProActive Kernel please make sure you install also the following required libraries:
To install the Jupyter ProActive Kernel, open a terminal and run:
$ pip install proactive proactive-jupyter-kernel --upgrade $ python -m proactive-jupyter-kernel.install
To create a Jupyter notebook:
$ jupyter lab
2 Create a job through a notebook
To create a ProActive job, fill the coding blocks of your notebook according to the following instructions:
#%connect(login=YOUR_LOGIN,password=YOUR_PASSWORD)If you do not have yet an ActiveEon account, please sign up on the try platform. It's free!
#%task(name=t1) print('Hello world') result='Task1_OK'
#%task(name=t2, dep=[t1]) print('From Jupyter Kernel!') result='Task2_OK'
3 Submit to the scheduler and visualize results