Generate Container (Local)

Generate Container (Local)

Procedure

  1. User must create an image for each of the components present in the MLaC folder (every component has a docker file present which will help to build the Docker image).
  2. Once all the images have been created user can run each container (using the images) one by one in the following sequence: Model Monitoring > Data Ingestion > Data Transformation > feature engineering > Model Training > model Registry > modelServing.
  3. You will see the status of each step can be seen in the shell.

Detailed Steps to Create a Container

Procedure

  1. Train the model.
  2. Go to the MLac generate code and click Generate the code.
  3. Copy the path.
  4. Open Aion shell and go the path: C:\Users\user_name\AppData\Local\HCLT\AION\target\AION_375_1\publish\
  5. Run the command python MLaC\run_pipeline.py.
  6. Basically we are creating persistent volume and intermediate files will be stored in the file (raw.data, traindata, etc).
  7. : Model Monitoring: {“status”:” success”,” DataFilepath:” pipeline executing first time”}
  8. Example: Data Ingestion: {: {“status”:” success”,” DataFilepath”: rawData.dat”,” Records”:130}
  9. In data ingestion it will read data from UI and created a new file.
  10. Similarly, DataTransformation > FeatureEngineering > ModelTraining > XGBClassifier_MLBased > ModelRegistry > ModelServing.
  11. Open putty goes to the location path.
  12. Check the docker images are present and delete it one by one using the command Docker rmi -f (forcefully) and image ID.
  13. Go the Model Monitoring path.
  14. Run the command Docker build -t modelmonitoring: y1.
  15. It will copy and all the Docker file images, Docker build -t model monitoring:y1(you can change as per convenience) .( docker build -t modelmonitoring:y1 .)
  16. Another example after ModelMonitoring, cd DataIngestion <docker build -t dataingestion:y1>.
  17. Similarly, DataTransformation > FeatureEngineering > ModelTraining > ModelRegistry > ModelServing.
  18. Check all images or build or not by using Docker images as command.
  19. Build the Docker image using this command so that we can use the container.
  20. To execute the each component one by one, please issue run docker command.

Steps to Run the Container

Procedure

After checking Docker images are present:
  1. Run command Docker run -it --rm -v /home/ubuntu/aion:/aion (model montoring Image id) 416398138 python code.py.
  2. It will create a container and it will map the folder.
  3. Follow the steps for Remaining (docker images) as Data Ingestion > Data Transformation > Feature Engineering > Model Training > Model Registry > Model.