Spaces:
Running
Running
Clement Vachet
commited on
Commit
·
a5ac89c
1
Parent(s):
1f4d311
Add Makefile
Browse files
Makefile
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.PHONY: lint
|
2 |
+
lint: # Lints our code.
|
3 |
+
python -m pylint ./
|
4 |
+
|
5 |
+
.PHONY: black
|
6 |
+
black: # Formats our code.
|
7 |
+
python -m black ./
|
8 |
+
|
9 |
+
.PHONY: refactor
|
10 |
+
refactor: # Refactor our code.
|
11 |
+
black lint
|
12 |
+
|
13 |
+
.PHONY: test
|
14 |
+
test: # Runs tests.
|
15 |
+
python -m pytest tests
|
16 |
+
|
17 |
+
# Set the image name
|
18 |
+
IMAGE_NAME := object-detection-lambda
|
19 |
+
TAG := latest
|
20 |
+
|
21 |
+
# Targets
|
22 |
+
.PHONY: docker-build
|
23 |
+
docker-build:
|
24 |
+
docker build -t $(IMAGE_NAME):$(TAG) .
|
25 |
+
|
26 |
+
.PHONY: docker-run
|
27 |
+
docker-run:
|
28 |
+
docker run -it --rm $(IMAGE_NAME):$(TAG)
|