-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
44 lines (34 loc) · 1.33 KB
/
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
36
37
38
39
40
41
42
43
44
.PHONY: clean data lint requirements
#################################################################################
# GLOBALS #
#################################################################################
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROFILE = default
PROJECT_NAME = ppi-3d-cnn
PYTHON_INTERPRETER = python
ifeq (,$(shell which conda))
HAS_CONDA=False
else
HAS_CONDA=True
endif
#################################################################################
# COMMANDS #
#################################################################################
## Install Python Dependencies
requirements: test_environment
$(PYTHON_INTERPRETER) -m pip install -U pip setuptools wheel
$(PYTHON_INTERPRETER) -m pip install -r requirements.txt
tensorflow-gpu:
$(PYTHON_INTERPRETER) -m pip install tensorflow-gpu
tensorflow:
$(PYTHON_INTERPRETER) -m pip install tensorflow
## Delete all compiled Python files
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
## Lint using flake8
lint:
flake8 --max-line-length=80 src
## Test python environment is setup correctly
test_environment:
$(PYTHON_INTERPRETER) test_environment.py