The container is based on the tensorflow/tensorflow:latest-py3 container, which can be found at https://hub.docker.com/r/tensorflow/tensorflow/tags/. This container supports Python 3 and TensorFlow and is customized with some additional dependencies such as Keras, Pandas, SciPy, Flask, and NGINX. We need to copy our algorithms on the container. For this exercise, we will use the code developed in Chapter 14, Implementing a Digital Twin - Advanced Analytics. The training steps have been defined in the train file. The most important part of the algorithm is as follows:
- The first part file of the train file defines the import:
#!/usr/bin/env python3…import pandas as pdimport numpy as npfrom keras.models import Sequential ...