-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
37 lines (29 loc) · 902 Bytes
/
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
# Settings
CONDA_ENV=ols-program-paper
SHELL=bash
CONDA=$(shell which conda)
ifeq ($(CONDA),)
CONDA=${HOME}/miniconda3/bin/conda
endif
default: help
install-conda: ## install Miniconda
curl -L $(MINICONDA_URL) -o miniconda.sh
bash miniconda.sh -b
.PHONY: install-conda
create-env: ## create conda environment
if ${CONDA} env list | grep '^${CONDA_ENV}'; then \
${CONDA} env update -f environment.yml; \
else \
${CONDA} env create -f environment.yml; \
fi
.PHONY: create-env
ACTIVATE_ENV = source $(shell dirname $(dir $(CONDA)))/bin/activate $(CONDA_ENV)
run-jupyter: ## run jupyter notebooks
$(ACTIVATE_ENV) && \
jupyter notebook
build-jupyterbook: ## build jupyter book
$(ACTIVATE_ENV) && \
jupyter-book build .
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help