A Python UDF to accept multiple measurements & load Keras written ML Model

I have got a scenario where,

1 - I write sensor data into InfluxDB
2 - I have Kapacitor up and running with the purpose to run a TICK script to get the data and pass those data into a Python UDF as a input to a machine learning model (custom written Keras LSTM)
3 - I perform a Fault Detection & Diagnosis for the provided multiple (temperature, humidity, pressure and etc.) time series data stored in different mesurements (20 sensors–> 20 measurements)
4 - I have InfluxDB 1.8 and latest Kapacitor running on docker containers

I have looked into many samples but ended up with the same level of mathematics like average and a simple Anomaly detection where a value of a single field in a single measurement will be passed into the Python UDF as in the following example.

I would like to have 10 data points from each measurement to be passed into UDF and pass it to predict function of the loaded Keras model in side the python UDF.

Please guide me through how to install python2 or 3 & Keras or Tensorflw libs in the Kapacitor docker container as my mython UDF will support the machine learning model part.

Any help appreciated :smiley: :smiley: :smiley:

Any help appreciated on this :+1: