Minor changes and better dependency handling
This commit is contained in:
@@ -2,25 +2,32 @@
|
|||||||
|
|
||||||
VENV_NAME?=env
|
VENV_NAME?=env
|
||||||
PYTHON=${VENV_NAME}/bin/python3
|
PYTHON=${VENV_NAME}/bin/python3
|
||||||
FILES=linear_regression.py prepare_train_model.py test_model.py
|
LINT_FILES=linear_regression.py prepare_train_model.py test_model.py
|
||||||
|
|
||||||
|
LINEAR_REGRESSION=linear_regression.py
|
||||||
|
OBJECT_DETECTION=prepare_train_model.py test_model.py
|
||||||
|
|
||||||
.DEFAULT: help
|
.DEFAULT: help
|
||||||
help:
|
help:
|
||||||
|
@echo "make linear_regression"
|
||||||
|
@echo " runs the simple linear regression example"
|
||||||
|
@echo "make objct_detection"
|
||||||
|
@ecgo " runs the object detection example"
|
||||||
@echo "make env"
|
@echo "make env"
|
||||||
@echo " creates and prepares the environment"
|
@echo " creates and prepares the environment"
|
||||||
@echo "make clean"
|
|
||||||
@echo " clean the development environment"
|
|
||||||
@echo "make data"
|
@echo "make data"
|
||||||
@echo " downloads and unpacks the data"
|
@echo " downloads and unpacks the data"
|
||||||
@echo "make lint"
|
@echo "make lint"
|
||||||
@echo " runs pylint and mpy"
|
@echo " runs pylint and mpy"
|
||||||
|
@echo "make clean"
|
||||||
|
@echo " cleans the development environment"
|
||||||
|
|
||||||
data: images
|
data: images
|
||||||
images:
|
images:
|
||||||
wget https://s3.us-east-2.amazonaws.com/naturalimages02/images.tar.gz
|
wget https://s3.us-east-2.amazonaws.com/naturalimages02/images.tar.gz
|
||||||
tar -xzf images.tar.gz
|
tar -xzf images.tar.gz
|
||||||
|
|
||||||
env: $(VENV_NAME)/bin/activate data
|
env: $(VENV_NAME)/bin/activate
|
||||||
$(VENV_NAME)/bin/activate:
|
$(VENV_NAME)/bin/activate:
|
||||||
test -d $(VENV_NAME) || python3 -m venv $(VENV_NAME)
|
test -d $(VENV_NAME) || python3 -m venv $(VENV_NAME)
|
||||||
${PYTHON} -m pip install -U pip
|
${PYTHON} -m pip install -U pip
|
||||||
@@ -32,8 +39,17 @@ $(VENV_NAME)/bin/activate:
|
|||||||
${PYTHON} -m pip install mypy
|
${PYTHON} -m pip install mypy
|
||||||
touch $(VENV_NAME)/bin/activate
|
touch $(VENV_NAME)/bin/activate
|
||||||
|
|
||||||
|
linear_regression: env
|
||||||
|
${PYTHON} $(LINEAR_REGRESSION)
|
||||||
|
|
||||||
|
object_detection_training: fine_tune.h5
|
||||||
|
fine_tune.h5:
|
||||||
|
${PYTHON} prepare_train_model.py
|
||||||
|
object_detection: env object_detection_training
|
||||||
|
${PYTHON} test_model.py
|
||||||
|
|
||||||
lint: env
|
lint: env
|
||||||
${PYTHON} -m pylint --rcfile=pylintrc $(FILES)
|
${PYTHON} -m pylint --rcfile=pylintrc $(LINT_FILES)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(VENV_NAME)
|
rm -rf $(VENV_NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user