DSI Docker Mini-Project: Code Overview

At 5:00 in this video (below) you will see me run the script locally.

To ensure this will work with any updates to packages like scikit-learn, instead of working in the "base" environment as I do in the video, please create a new virtual environment.

[ 01 ] Create a new virtual environment called docker-local-env

In Anaconda Prompt (or your Terminal if on Mac/Linux) please enter:

conda create -n docker-local-env python=3.9 scikit-learn==1.0.1 pandas==1.4.4 joblib==1.1.1

This will take around two minutes to create.

[ 02 ] Activate the new virtual env

conda activate docker-local-env

[ 03 ] Run the Python script

Once you're working within your new docker-local-env environment, as long as you're pointing to your .../Docker/DSI Model Tester folder (as per the tutorial), you can run the script and pass in the input features. Example:

python ml-model.py 20 M 100

Happy coding!

Complete and Continue