You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lb...@apache.org on 2016/03/21 14:52:11 UTC

incubator-toree git commit: Modified dev target to use docker and allow JVM debugger

Repository: incubator-toree
Updated Branches:
  refs/heads/master 69241c93a -> 9be21fa0d


Modified dev target to use docker and allow JVM debugger


Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/9be21fa0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/9be21fa0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/9be21fa0

Branch: refs/heads/master
Commit: 9be21fa0d8e22ed1f2dfafb747c1e0221754bab1
Parents: 69241c9
Author: Gino Bustelo <lb...@apache.org>
Authored: Tue Mar 15 17:07:03 2016 -0500
Committer: Gino Bustelo <lb...@apache.org>
Committed: Mon Mar 21 08:49:34 2016 -0500

----------------------------------------------------------------------
 Makefile        | 13 ++++++++++---
 etc/kernel.json | 20 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/9be21fa0/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 3330457..530b41c 100644
--- a/Makefile
+++ b/Makefile
@@ -96,9 +96,16 @@ kernel/target/scala-2.10/$(ASSEMBLY_JAR): project/build.properties project/Build
 
 build: kernel/target/scala-2.10/$(ASSEMBLY_JAR)
 
-dev: VM_WORKDIR=~
-dev: dist
-	$(call RUN,ipython notebook --ip=* --no-browser)
+dev: DOCKER_WORKDIR=/srv/toree/etc/examples/notebooks
+dev: SUSPEND=n
+dev: DEBUG_PORT=5005
+dev: .example-image dist
+	@$(DOCKER) \
+		-e SPARK_OPTS="--driver-java-options=-agentlib:jdwp=transport=dt_socket,server=y,suspend=$(SUSPEND),address=5005" \
+		-v `pwd`/etc/kernel.json:/usr/local/share/jupyter/kernels/toree/kernel.json \
+		-p $(DEBUG_PORT):5005 -p 8888:8888 \
+		--user=root  $(EXAMPLE_IMAGE) \
+		bash -c "cp -r /srv/toree/dist/toree/* /usr/local/share/jupyter/kernels/toree/. && jupyter notebook --ip=* --no-browser"
 
 test: VM_WORKDIR=/src/toree-kernel
 test:

http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/9be21fa0/etc/kernel.json
----------------------------------------------------------------------
diff --git a/etc/kernel.json b/etc/kernel.json
new file mode 100644
index 0000000..52a38a8
--- /dev/null
+++ b/etc/kernel.json
@@ -0,0 +1,20 @@
+{
+  "language_info": {
+    "name": "scala"
+  },
+  "display_name": "Toree",
+  "env": {
+    "PYTHONPATH": "/usr/local/spark/python:/usr/local/spark/python/lib/py4j-0.8.2.1-src.zip",
+    "SPARK_HOME": "/usr/local/spark",
+    "CAPTURE_STANDARD_ERR": "true",
+    "MAX_INTERPRETER_THREADS": "16",
+    "CAPTURE_STANDARD_OUT": "true",
+    "SEND_EMPTY_OUTPUT": "false"
+  },
+  "argv": [
+    "/usr/local/share/jupyter/kernels/toree/bin/run.sh",
+    "--profile",
+    "{connection_file}"
+  ],
+  "codemirror_mode": "scala"
+}
\ No newline at end of file