-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
39 lines (30 loc) · 1.17 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
SOURCEDIR = nbs
DSTDIR = _nbs
.PHONY: purge generate execute sphinx build setup check-deps
purge:
@echo "\nRemoving all files that are not notebooks on '$(SOURCEDIR)'...\n"
find $(SOURCEDIR) -type f ! -name "*.ipynb" -delete
generate:
@echo "\n\nGenerating all tutorials notebooks to '$(SOURCEDIR)'...\n"
jupyter nbconvert $(SOURCEDIR)/**.ipynb --to notebook --output-dir $(DSTDIR)
execute:
@echo "\n\nExecuting all tutorials notebooks under '$(DSTDIR)'...\n"
jupyter nbconvert $(DSTDIR)/**.ipynb --execute --inplace
build: purge generate render
setup-quarto:
curl -LO https://www.quarto.org/download/latest/quarto-linux-amd64.deb
sudo dpkg -i quarto-linux-amd64.deb
rm quarto-linux-amd64.deb
setup:
pip install -r requirements.txt && pip install -r requirements-dev.txt;
preview:
quarto preview .
render:
quarto render .
check-deps:
@which python
@python --version
@python -c "import kornia;print('Kornia version: ', kornia.__version__)"
@python -c "import torch;print('Pytorch version: ', torch.__version__)"
@python -c "import torchvision;print('Pytorch vision version: ', torchvision.__version__)"
@python -c "import cv2;print('OpenCV version: ', cv2.__version__)"