-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (39 loc) · 1.58 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
45
46
47
48
49
50
51
52
53
.PHONY: nimrod
help: ## Show help
@grep -E '^[.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
clean: ## Clean autogenerated files
rm -rf dist
find . -type f -name "*.DS_Store" -ls -delete
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
find . | grep -E ".pytest_cache" | xargs rm -rf
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf
rm -f .coverage
clean-logs: ## Clean logs
rm -rf logs/**
format: ## Run pre-commit hooks
pre-commit run -a
sync: ## Merge changes from main branch to your current branch
git pull
git pull origin main
test: ## Run not slow tests
pytest -k "not slow"
test-full: ## Run all tests
pytest
train: ## Train the model
python src/train.py
docker-build:
# docker build --network host -t slegroux/nimrod -f ".devcontainer/Dockerfile" . --push
# docker buildx build --network host --platform linux/amd64,linux/arm64 -t slegroux/nimrod:latest -f ".devcontainer/Dockerfile.nimrod" .
docker buildx build --network host --platform linux/amd64 -t slegroux/nimrod:latest -f ".devcontainer/Dockerfile" .
docker-build-mac:
docker buildx build --network host -t slegroux/nimrod-mac:latest -f ".devcontainer/Dockerfile" .
docker-test:
## opt: --privileged
docker run -it --network host -v $(PWD):/app --rm slegroux/nimrod /bin/bash
docker-test-mac:
## opt: --privileged
docker run -it --network host -v $(PWD):/app --rm slegroux/nimrod-mac /bin/bash
docker-run:
docker run -p 8888:8888 -v $(PWD):/app slegroux/nimrod
docker-push: # push to dockerhub
docker push slegroux/nimrod