forked from nautechsystems/nautilus_trader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (50 loc) · 1.53 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
54
55
56
57
58
59
60
61
62
PROJECT?=nautechsystems/nautilus_trader
REGISTRY?=ghcr.io/
IMAGE?=${REGISTRY}${PROJECT}
GIT_TAG:=$(shell git rev-parse --abbrev-ref HEAD)
IMAGE_FULL?=${IMAGE}:${GIT_TAG}
EXTRAS?="hyperopt ib redis"
.PHONY: build clean docs
install:
poetry install --extras ${EXTRAS}
build: nautilus_trader
poetry run python build.py
clean:
rm -rf .mypy_cache
rm -rf .nox
rm -rf .pytest_cache
rm -rf build
rm -rf cython_debug
rm -rf dist
rm -rf docs/build
find . -name target -type d -exec rm -rf {} +
find . -name .benchmarks -type d -exec rm -rf {} +
find . -name '*.dll' -exec rm {} +
find . -name '*.prof' -exec rm {} +
find . -name '*.pyc' -exec rm {} +
find . -name '*.pyo' -exec rm {} +
find . -name '*.so' -exec rm {} +
find . -name '*.o' -exec rm {} +
find . -name '*.c' -exec rm {} +
rm -f coverage.xml
rm -f dump.rdb
docs:
poetry run sphinx-build docs docs/build/html -b html
format:
(cd nautilus_core && cargo fmt)
pre-commit: format
pre-commit run --all-files
update:
(cd nautilus_core && cargo update)
poetry update
docker-build: clean
docker pull ${IMAGE_FULL} || docker pull ${IMAGE}:develop || true
docker build -f .docker/nautilus_trader.dockerfile --platform linux/x86_64 -t ${IMAGE_FULL} .
docker-build-force:
docker build --no-cache -f .docker/nautilus_trader.dockerfile -t ${IMAGE_FULL} .
docker-push:
docker push ${IMAGE_FULL}
docker-build-jupyter:
docker build --build-arg GIT_TAG=${GIT_TAG} -f .docker/jupyterlab.dockerfile --platform linux/x86_64 -t ${IMAGE}:jupyter .
docker-push-jupyter:
docker push ${IMAGE}:jupyter