-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·58 lines (43 loc) · 1.88 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
# Copyright (c) Datalayer, Inc. https://datalayer.io
# Distributed under the terms of the MIT License.
SHELL=/bin/bash
# CONDA=source $$(conda info --base)/etc/profile.d/conda.sh
# CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate
# CONDA_DEACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda deactivate
# CONDA_REMOVE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda remove -y --all -n
CONDA=source ~/.bash_profile
CONDA_ACTIVATE=eval "$(micromamba shell hook --shell=bash)"; micromamba activate
CONDA_DEACTIVATE=micromamba deactivate
CONDA_REMOVE=micromamba remove -y --all -n
ENV_NAME=datalayer
.DEFAULT_GOAL := default
.SILENT: init
.PHONY: port-forward storybook
help: ## display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
default: help ## default target is help
env: warning ## env
($(CONDA); \
SLUGIFY_USES_TEXT_UNIDECODE=yes conda env create -n datalayer -f ./environment.yml )
@exec echo "You can now populate the datalayer environment."
@exec echo "-------------------------------------------------------"
@exec echo "conda activate datalayer"
@exec echo "-------------------------------------------------------"
env-rm: warning ## env-rm
($(CONDA); \
conda deactivate && \
conda remove -y --name ${ENV_NAME} --all || true )
build-docker:
rm -fr ./dist/* && \
yarn build:webpack && \
docker build -t datalayer/jupyter-manager:0.0.1 .
start-jupyterhub:
rm -fr ./dist/*
yarn build
sqlite:
($(CONDA_ACTIVATE) ${ENV_NAME}; \
sqlite3 ./jupyterhub.sqlite )
kill:
./dev/sh/kill.sh
warning:
echo "\x1b[34m\x1b[43mEnsure you have run \x1b[1;37m\x1b[41m conda deactivate \x1b[22m\x1b[34m\x1b[43m before invoking this.\x1b[0m"