Skip to content

Commit

Permalink
Merge pull request #267 from rstudio/mbh-run-local
Browse files Browse the repository at this point in the history
Add run-local target
  • Loading branch information
meatballhat authored Jun 24, 2020
2 parents 82cd173 + ed38712 commit 041e490
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ NB_UID := $(shell id -u)
NB_GID := $(shell id -g)

IMAGE := rstudio/rsconnect-jupyter-py
VERSION := $(shell pipenv run python setup.py --version 2>/dev/null || echo 'NOTSET')
BDIST_WHEEL := dist/rsconnect_jupyter-$(VERSION)-py2.py3-none-any.whl
S3_PREFIX := s3://rstudio-connect-downloads/connect/rsconnect-jupyter
NOTEBOOKS_DIR := /notebooks
PORT := $(shell printenv PORT || echo 9999)
S3_PREFIX := s3://rstudio-connect-downloads/connect/rsconnect-jupyter
VERSION := $(shell pipenv run python setup.py --version 2>/dev/null || echo 'NOTSET')

BDIST_WHEEL := dist/rsconnect_jupyter-$(VERSION)-py2.py3-none-any.whl
JUPYTER_LOG_LEVEL ?= INFO

# NOTE: See the `dist` target for why this exists.
Expand Down Expand Up @@ -71,15 +72,20 @@ dist: version-frontend

.PHONY: run
run: install
mkdir -p $(NOTEBOOKS_DIR)
pipenv run jupyter notebook \
-y \
--log-level=$(JUPYTER_LOG_LEVEL) \
--notebook-dir=/notebooks \
--notebook-dir=$(NOTEBOOKS_DIR) \
--ip='0.0.0.0' \
--port=9999 \
--no-browser \
--NotebookApp.token=''

.PHONY: run-local
run-local: NOTEBOOKS_DIR := $(CURDIR)/notebooks3.8
run-local: run

.PHONY: install
install: yarn
pipenv install --dev
Expand Down

0 comments on commit 041e490

Please sign in to comment.