An academic project that includes some of the concepts covered during the "DevOps for Data Science" course DSIA-5201A at ESIEE Paris.
Keywords: Machine learning, DevOps, Flask, Python, Docker
Authors:
- Vincent Barbosa Vaz
- Dhanashri Rajput
- Clea Ngouansavanh
- Elias Bouillanne
Teacher: Pouya Yousefi
Course unit: DSIA-5201A (ESIEE Paris)
-
Know what to expect in enterprise
- Understand tools, processes, and techniques for deploying data science software into a production environment as you would in a corporate role.
- Look at a dataset and / or business problem and provide solutions
- Be able to talk and understand data science software dev and infrastructure
- Be able to speak Agile & Scrum
-
Know your worth
- Developer
- Data Scientist: Machine Learning Engineer
- DevOps: Site Reliability Engineer, Infrastructure Engineer, Cloud Engineer
Checkout the app: https://simple-iris-webapp.herokuapp.com/
Note: The website may also be down from time to time (free plan).
Heroku: Build apps for free on Heroku
- cd into DSIA5201A_app
- Create the environment [1]
- Activate the environment and install libraries [2]
- Export the environment variable and run the app [3]
Exit the project:
- Quit the application with CTRL+C
- Deactivate the environment [4]
[1] Create the environment
python3 -m venv venv/
[2] Activate the environment and install libraries
. venv/bin/activate
pip install -r requirements.txt
Ensure that you are using the right pip:
which pip
Output should be something like : path_to/DSIA5201A/DSIA5201A_app/venv/bin/pip
If not:
alias pip=path_to/DSIA5201A/DSIA5201A_app/venv/bin/pip
Alternatively you can specify the path to the pip binary you want to use before any pip command:
path_to/venv/bin/pip yourcommand
[3] Export the environment variable and run the app
export FLASK_APP=DSIA5201A_app
pip install -e .
python3 -m flask run
[4] Deactivate the environment
deactivate
Misc
Output installed packages in requirements format (alternative pip list):
pip freeze
Generate a requirements file:
pip freeze > requirements.txt
Turn on the development features
export FLASK_ENV=development
simple-iris-webapp/DSIA5201A_app/: the app
simple-iris-webapp/DSIA5201A_app/DSIA5201A_app/static/ai/: python code to build the classifier
If you want to rebuild manually the docker image
cd into DSIA5201A_app folder:
cd path_to/DSIA5201A_app
Create the docker containers (depending on your computer and your connexion this operation can take a while)
docker build -t app_flask:latest .
If you don't want to rebuild manually the docker image
Fetch the image from docker hub:
docker pull eliasbouillanne/dsia5201_group4:latest
Launch the container
docker run -p 5000:5000 app_flask