-
Notifications
You must be signed in to change notification settings - Fork 206
/
Makefile
35 lines (26 loc) · 799 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
setup:
python3 -m venv ~/.flask-ml-azure
#source ~/.flask-ml-azure/bin/activate
install:
pip install --upgrade pip &&\
pip install -r requirements.txt
test:
#python -m pytest -vv --cov=myrepolib tests/*.py
#python -m pytest --nbval notebook.ipynb
lint:
#hadolint Dockerfile #uncomment to explore linting Dockerfiles
pylint --disable=R,C,W1203,W0702 app.py
docker-build:
docker build -t my-python-flask-app .
docker-run:
docker run -p 5000:5000 my-python-flask-app
docker-debug:
#to debug inside the container
docker run -d -p 5000:5000 --name my-flask-container my-python-flask-app
docker exec -it my-flask-container bash
docker-clean:
#remove all images locally
if [ -n "$$(docker images -aq)" ]; then \
docker rmi -f $$(docker images -aq); \
fi
all: install lint test