-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 944 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (28 loc) · 944 Bytes
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
.PHONY: build run test clean help
IMAGE_NAME = adaxon-recommender
PORT = 8000
DATA_PATH = $(shell pwd)/data
help:
@echo "Available commands:"
@echo " make build - Build the Docker image"
@echo " make run - Run the container with local data mounted"
@echo " make test - Run pytest"
@echo " make evaluate - Run the offline evaluation script"
@echo " make clean - Remove python cache files"
build:
docker build -t $(IMAGE_NAME) .
run:
docker run -p $(PORT):8000 -v $(DATA_PATH):/data $(IMAGE_NAME)
test:
pytest tests/
docker-test:
docker build -t $(IMAGE_NAME)-test .
docker run --rm $(IMAGE_NAME)-test pytest tests/
evaluate:
python3 run_evaluation.py
docker-evaluate:
docker build -t $(IMAGE_NAME)-eval .
docker run --rm -v $(DATA_PATH):/data $(IMAGE_NAME)-eval python3 run_evaluation.py
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete