You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2021/02/02 13:57:26 UTC

[submarine] branch master updated: SUBMARINE-698. Enable notebook to associate with git-based repo

This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 189448a  SUBMARINE-698. Enable notebook to associate with git-based repo
189448a is described below

commit 189448ad36796d2738b1c6c22dead309746a6761
Author: Lisa <ae...@gmail.com>
AuthorDate: Sat Jan 30 21:47:21 2021 +0800

    SUBMARINE-698. Enable notebook to associate with git-based repo
    
    ### What is this PR for?
    Switch to JupyterLab from jupyter-notebook
    
    ### What type of PR is it?
    [Improvement]
    
    ### Todos
    * [ ] - Task
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-698
    
    ### How should this be tested?
    https://travis-ci.org/github/aeioulisa/submarine/builds/756075486
    
    ### Screenshots (if appropriate)
    ![image](https://user-images.githubusercontent.com/30621230/105704205-6794fa00-5f49-11eb-924f-7b05fc6fa932.png)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Lisa <ae...@gmail.com>
    
    Signed-off-by: Kevin <pi...@apache.org>
    
    Closes #497 from aeioulisa/SUBMARINE-698 and squashes the following commits:
    
    2a60564 [Lisa] fix indentation
    24b1a6c [Lisa] Enable notebook to associate with git-based repo
---
 dev-support/docker-images/jupyter/Dockerfile                        | 6 ++++--
 docs/database/submarine-data.sql                                    | 2 +-
 .../apache/submarine/server/submitter/k8s/util/NotebookUtils.java   | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dev-support/docker-images/jupyter/Dockerfile b/dev-support/docker-images/jupyter/Dockerfile
index dbcfb60..1b4b626 100644
--- a/dev-support/docker-images/jupyter/Dockerfile
+++ b/dev-support/docker-images/jupyter/Dockerfile
@@ -92,9 +92,11 @@ RUN wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA
     rm -rf /home/$NB_USER/.cache/yarn
 
 # Install latest sumbarine python sdk and notebook
-RUN pip install notebook==6.1.3 && \
-    git clone https://github.com/apache/submarine && \
+RUN git clone https://github.com/apache/submarine && \
     pip install submarine/submarine-sdk/pysubmarine && \
+    conda install nodejs && \
+    conda install -c conda-forge jupyterlab jupyterlab-git && \
+    jupyter lab build && \
     cp submarine/submarine-sdk/pysubmarine/example/submarine_experiment_sdk.ipynb $HOME && \
     cp -r submarine/submarine-sdk/pysubmarine/example/{data,deepfm_example.ipynb,deepfm.json} $HOME && \
     rm submarine -rf
diff --git a/docs/database/submarine-data.sql b/docs/database/submarine-data.sql
index 93ed13d..be6300e 100644
--- a/docs/database/submarine-data.sql
+++ b/docs/database/submarine-data.sql
@@ -85,7 +85,7 @@ INSERT INTO `params` (`id`, `key`, `value`, `worker_index`) VALUES
 -- Records of environment
 -- ----------------------------
 INSERT INTO `environment` VALUES
-('environment_1600862964725_0001', 'notebook-env', '{"name":"notebook-env","dockerImage":"apache/submarine:jupyter-notebook-0.5.0","kernelSpec":{"name":"submarine_jupyter_py3","channels":["defaults"],"dependencies":[]}}', 'admin', '2020-09-21 14:00:05', 'admin', '2020-09-21 14:00:14');
+('environment_1600862964725_0001', 'notebook-env', '{"name":"notebook-env","dockerImage":"apache/submarine:jupyter-notebook-0.6.0-SNAPSHOT","kernelSpec":{"name":"submarine_jupyter_py3","channels":["defaults"],"dependencies":[]}}', 'admin', '2020-09-21 14:00:05', 'admin', '2020-09-21 14:00:14');
 
 -- ----------------------------
 -- Records of experiment_templates
diff --git a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/util/NotebookUtils.java b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/util/NotebookUtils.java
index 33f83fe..ef4ed83 100644
--- a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/util/NotebookUtils.java
+++ b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/util/NotebookUtils.java
@@ -98,7 +98,7 @@ public class NotebookUtils {
     notebook.setCreatedTime(notebookCR.getMetadata().getCreationTimestamp().toString());
     // notebook url
     notebook.setUrl("/notebook/" + notebookCR.getMetadata().getNamespace() + "/" +
-            notebookCR.getMetadata().getName() + "/");
+            notebookCR.getMetadata().getName() + "/lab");
 
     // process status
     Map<String, String> statusMap = processStatus(notebookCR);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org