-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 930 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Environment variables
PYTHON = python
PIP = pip
REMOVE = rm -rf
CREATE = mkdir -p
PRINT = @echo
# Paths
LOG_PATH = ./logs
# targets
## setup : Setup the virtual environment.
.PHONY: setup
## install : Install dependencies.
.PHONY: install
## update : Update dependencies.
.PHONY: update
## experiments : Run experiments.
.PHONY: experiments
## clean : Clean up.
.PHONY: clean
## visualize : Visualize results on tensorboard.
.PHONY: visualize
## reset : Reset the environment.
.PHONY: reset
# recipes
setup: create_env create_temp
install: install_requirements
update: update_requirements
# rules
create_env:
$(PRINT) "Creating Virtual Environment..."
$(PYTHON) -m venv ./.venv
$(PRINT)
install_requirements:
$(PRINT) "Installing Dependencies..."
$(PIP) install -r ./requirements.txt
$(PRINT) ""
update_requirements:
$(PRINT) "Updating Dependencies..."
$(PIP) freeze > ./requirements.txt
$(PRINT) ""