diff --git a/README.md b/README.md index 817b981..72d4237 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Teach practical aspects of productionizing ML services — from collecting requi Data scientists and ML engineers. Also software engineers and data engineers interested in learning about putting ML in production. ### Pre-requisites +For the best experience, we recommend that you have Docker, bash and Make installed on your machine. Follow the instructions to install them if you don't have them already. * Python * Docker @@ -16,11 +17,154 @@ Data scientists and ML engineers. Also software engineers and data engineers int * Prior exposure to machine learning * Prior programming experience (at least 1+ year) -### Timeline +## How to set up -Course start: March 8th -Course end: March 16th -Final project presentation: March 31st +### Installing prerequisites +Let's first make sure you have access to the Docker. If you are not sure, follow the instructions below. + +#### Docker +Check that you have Docker desktop installed in your machine by running: + +```bash +docker -v +``` + +If that is not the case, just follow the official instructions: + +* [Install Docker - Mac OS](https://docs.docker.com/desktop/install/mac-install/) +* [Install Docker - Linux](https://docs.docker.com/desktop/install/linux-install/) +* [Install Docker - Windows](https://docs.docker.com/desktop/install/windows-install/) + +For those of you working on Windows, you might need to update Windows Subsystem for Linux. To do so, simply open PowerShell and run: + +```bash +wsl --update +``` + +Once docker is installed, make sure that it is running correctly by running: + +```bash +docker run -p 80:80 docker/getting-started +``` + +If you check the Docker App, you should see a getting started container running. Once you've checked that this works correctly, remove the container via the UI. + +
+ Optional + You can also perform these operations directly from the command line, by running docker ps to check the running containers and docker rm -f [CONTAINER-ID] to remove it. +
+ +#### Bash +Check that you have bash installed in your machine by opening a terminal and running: + +```bash +bash --version +``` +This should be the case for all Mac and Linux users. + +If you are using Windows, you can use the Git Bash terminal that comes with Git. You can download it [here](https://git-scm.com/downloads). + +#### Make +Check that you have make installed in your machine by opening a terminal and running: + +```bash +make -v +``` +This should be the case for all Mac and Linux users. + +If you are using Windows, you can then install make using Chocolatey. You can download Chocolatey [here](https://chocolatey.org/install). + +Then, restart Git Bash and run: + +```bash +choco install make +``` + +Restart Git Bash again and check that make is installed by running: + +```bash +make -v +``` + +If you did not manage to install make, you can still follow the course by following the instructions in the next section under the label "Without `make` and `bash` installed on your terminal". + +### Prepare the course infrastructure + +Now, we will guide you to build the required Docker Images. With a terminal, go to the root of this folder. + +First check that you have `make` installed by running `make -v` + +
+ If you have `make` and `bash` installed on your terminal + Then simply run: +

make prepare-mlops-crashcourse

+
+ +
+ Without `make` and `bash` installed on your terminal + Please run: +

docker build -t mlops_notebooks ./lesson/
+docker build -t mlops_mlflow ./mlflow_server/

+
+ +### Launch the course + +Follow these steps to mount the two containers and open the user interface to start the course. + +
+ If you have `make` and `bash` installed on your terminal + You can directly bundle all this section's commands by typing: +

make launch-mlops-crashcourse

+
+ +
+ Without `make` and `bash` installed on your terminal + First, create a network: +

docker network create --driver bridge mlops-crashcourse

+

Then:

+

docker run -it --rm --user root -p 10000:8888 -p 8000:8000 -p 4200:4200 -v ${PWD}/mlflow_server/local:/mlflow -e JUPYTER_ENABLE_LAB=yes -e JUPYTER_TOKEN=docker -e MLFLOW_TRACKING_URI=http://mlflow:5001 --network mlops-crashcourse --name jupyter -d mlops_notebooks

+

And:

+

docker run -it -d --rm -p 5001:5000 -v ${PWD}/mlflow_server/local:/mlflow --network mlops-crashcourse --name mlflow mlops_mlflow

+

You can then open your favorite browser and open in two tabs the two urls we will be working with:

+
+ +Once the Jupyter server is launched, you will need to use a token to attach your browser to it. The token you should use is `MLOPS`. + +### Time to work + +All the activities of this course can be found in the `notebooks` folder. If you are using docker, then you will be working on jupyter lab and the folder will be immediately visible from the root. If instead, you are running this course locally on your computer, then you can find the notebooks under `lessons/{lesson-name}/notebooks`. + +### Cleanup + +Once you are done with the course, you can follow these steps to clean your workspace. + +> Careful! This will destroy all your work if you did not save it locally. + +
+ If you have `make` and `bash` installed on your terminal + + Then simply run: + ```bash + make clean-mlops-crashcourse + ``` +
+ +
+ Without `make` and `bash` installed on your terminal + Please run + + ```bash + docker stop jupyter + docker stop mlflow + docker image rm mlops_notebooks + docker image rm mlops_mlflow + docker network rm mlops-crashcourse + ``` +
## Syllabus @@ -87,3 +231,5 @@ Final project presentation: March 31st - Quinquet Guillaume - Si Larbi Karim - Deschamps Mael + +> If you encounter difficulties during, don't hesitate to call us for help