-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (21 loc) · 862 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
APPNAME=`cat environment.yml|grep name|cut -f2 -d' '`
TARGETS=activate setup update
# Oneshell means I can run multiple lines in a recipe in the same shell, so I don't have to
# chain commands together with semicolon
.ONESHELL:
# Need to specify bash in order for conda activate to work.
SHELL=/bin/bash
# Note that the extra activate is needed to ensure that the activate floats env to the front of PATH
CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate ; conda activate
all:
@echo "Try one of: ${TARGETS}"
activate:
echo "Digit this command to activate the conda env: conda activate $(APPNAME)"
setup: update
$(CONDA_ACTIVATE) $(APPNAME)
Rscript irkernel_setup.r
cp launch_jupyterlab.sbatch $(HOME)
update: environment.yml
conda env update --file environment.yml
build_docker:
docker build -t jupyterlab:latest .