blob: 594b6b248276c2015d4194fab3c8a9ce8f348928 [file] [log] [blame]
<!doctype html>
<html lang="zh-cn" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-designDocs/notebook-implementation">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.18">
<title data-rh="true">Notebook Implementation | Apache Submarine</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://submarine.apache.org//zh-cn/docs/next/designDocs/notebook-implementation"><meta data-rh="true" name="docusaurus_locale" content="zh-cn"><meta data-rh="true" name="docsearch:language" content="zh-cn"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Notebook Implementation | Apache Submarine"><meta data-rh="true" name="description" content="&lt;!--"><meta data-rh="true" property="og:description" content="&lt;!--"><link data-rh="true" rel="icon" href="/zh-cn/img/submarine.ico"><link data-rh="true" rel="canonical" href="https://submarine.apache.org//zh-cn/docs/next/designDocs/notebook-implementation"><link data-rh="true" rel="alternate" href="https://submarine.apache.org//docs/next/designDocs/notebook-implementation" hreflang="en"><link data-rh="true" rel="alternate" href="https://submarine.apache.org//zh-cn/docs/next/designDocs/notebook-implementation" hreflang="zh-cn"><link data-rh="true" rel="alternate" href="https://submarine.apache.org//docs/next/designDocs/notebook-implementation" hreflang="x-default"><link rel="stylesheet" href="/zh-cn/assets/css/styles.80258812.css">
<link rel="preload" href="/zh-cn/assets/js/runtime~main.aaa6cb63.js" as="script">
<link rel="preload" href="/zh-cn/assets/js/main.54762d30.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_ZgBM">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-cn/"><div class="navbar__logo"><img src="/zh-cn/img/icons/128.png" alt="Apache Submarine Site Logo" class="themedImage_W2Cr themedImage--light_TfLj"><img src="/zh-cn/img/icons/128.png" alt="Apache Submarine Site Logo" class="themedImage_W2Cr themedImage--dark_oUvU"></div><b class="navbar__title">Apache Submarine</b></a><a class="navbar__item navbar__link navbar__link--active" href="/zh-cn/docs/next/gettingStarted/quickstart">文档</a><a class="navbar__item navbar__link" href="/zh-cn/docs/next/api/environment">API</a><a class="navbar__item navbar__link" href="/zh-cn/docs/next/download">下载</a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><span><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_dNtB"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg><span>中文</span></span></a><ul class="dropdown__menu"><li><a href="/docs/next/designDocs/notebook-implementation" target="_self" rel="noopener noreferrer" class="dropdown__link">English</a></li><li><a href="/zh-cn/docs/next/designDocs/notebook-implementation" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active">中文</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/zh-cn/docs/next/gettingStarted/quickstart">master 🏃</a><ul class="dropdown__menu"><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/zh-cn/docs/next/designDocs/notebook-implementation">master 🏃</a></li><li><a class="dropdown__link" href="/zh-cn/docs/designDocs/notebook-implementation">0.8.0</a></li><li><a class="dropdown__link" href="/zh-cn/docs/0.7.0/designDocs/notebook-implementation">0.7.0</a></li><li><a class="dropdown__link" href="/zh-cn/docs/0.6.0/designDocs/notebook-implementation">0.6.0</a></li><li><a class="dropdown__link" href="/zh-cn/versions">All versions</a></li></ul></div><a href="https://github.com/apache/submarine" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/foundation/how-it-works.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Apache 软件基金会<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/events/current-event" target="_blank" rel="noopener noreferrer" class="dropdown__link">Events<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Apache 授权<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">感谢<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">安全<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">赞助<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Search" aria-label="Search" class="navbar__search-input search-bar"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper"><div class="docPage_P2Lg"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><aside class="theme-doc-sidebar-container docSidebarContainer_rKC_"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/next/gettingStarted/quickstart">Getting Started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/next/userDocs/submarine-sdk/submarine-cli">User Docs</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/next/devDocs/">Developer Docs</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/next/community/">Community</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh-cn/docs/next/designDocs/architecture-and-requirements">Design Docs</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/next/designDocs/architecture-and-requirements">Architecture and Requirment</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/next/designDocs/implementation-notes">Implementation Notes</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/next/designDocs/environments-implementation">Environments Implementation</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/next/designDocs/experiment-implementation">Experiment Implementation</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh-cn/docs/next/designDocs/notebook-implementation">Notebook Implementation</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/next/designDocs/storage-implementation">Storage Implementation</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-cn/docs/next/designDocs/submarine-server/architecture">Submarine Server</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-cn/docs/next/designDocs/wip-designs/submarine-launcher">WIP Design Docs</a></div></li></ul></li></ul></nav></div></aside><main class="docMainContainer_TCnq"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_DM6M"><div class="theme-doc-version-banner alert alert--warning margin-bottom--md" role="alert"><div>This is unreleased documentation for <!-- -->Apache Submarine<!-- --> <b>master 🏃</b> version.</div><div class="margin-top--md">For up-to-date documentation, see the <b><a href="/zh-cn/docs/designDocs/notebook-implementation">latest version</a></b> (<!-- -->0.8.0<!-- -->).</div></div><div class="docItemContainer_vinB"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Xlws" aria-label="breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a class="breadcrumbs__link" href="/zh-cn/">🏠</a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><span class="breadcrumbs__link" itemprop="item name">Design Docs</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="item name">Notebook Implementation</span><meta itemprop="position" content="2"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">Version: master 🏃</span><div class="tocCollapsible_jdIR theme-doc-toc-mobile tocMobile_TmEX"><button type="button" class="clean-btn tocCollapsibleButton_Fzxq">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Notebook Implementation</h1></header><h2 class="anchor anchorWithStickyNavbar_mojV" id="overview">Overview<a class="hash-link" href="#overview" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_mojV" id="users-interaction">User&#x27;s interaction<a class="hash-link" href="#users-interaction" title="Direct link to heading"></a></h3><p>Users can start N (N &gt;= 0) number of Notebook sessions, a notebook session is a running notebook instance.</p><ul><li>Notebook session can be launched by Submarine UI (P0), and Submarine CLI (P2). </li><li>When launch notebook session, users can choose T-shirt size of notebook session (how much mem/cpu/gpu resources, or resource profile such as small, medium, large, etc.). (P0)</li><li>And user can choose an environment for notebook. More details please refer to <a href="/zh-cn/docs/next/designDocs/environments-implementation">environment implementation</a> (P0)</li><li>When start a notebook, user can choose what code to be initialized, similar to experiment. (P1)</li><li>Optionally, users can choose to attach a persistent volume to a notebook session. (P2)</li></ul><p>Users can get a list of notebook sessions belongs to themselves, and connect to notebook session. </p><p>User can choose to terminate a running notebook session.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="admins-interaction">Admin&#x27;s interaction<a class="hash-link" href="#admins-interaction" title="Direct link to heading"></a></h3><ul><li>How many concurrent notebook sessions can be launched by each user is determined by resource quota limits of each user, and maximum concurrent notebook sessions can be launched by each user. (P2)</li></ul><h2 class="anchor anchorWithStickyNavbar_mojV" id="relationship-with-other-components">Relationship with other components<a class="hash-link" href="#relationship-with-other-components" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_mojV" id="metadata-store">Metadata store<a class="hash-link" href="#metadata-store" title="Direct link to heading"></a></h3><p>Running notebook sessions&#x27; metadata need persistented in Submarine&#x27;s metadata store (Database).</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="submarine-server">Submarine Server<a class="hash-link" href="#submarine-server" title="Direct link to heading"></a></h3><div class="codeBlockContainer_I0IT theme-code-block"><div class="codeBlockContent_wNvx" style="color:#bfc7d5;background-color:#292d3e"><pre tabindex="0" class="prism-code language-text codeBlock_jd64 thin-scrollbar"><code class="codeBlockLines_mRuA"><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +--------------+ +--------Submarine Server--------------------+</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> |Submarine UI | | +-------------------+ |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | |+---&gt; Submarine | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | Notebook | | | Notebook REST API| |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +--------------+ | | | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | +--------+----------+ +--------------+ |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | +-&gt;|Metastore | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | +--------v----------+ | |DB | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | Submarine +--+ +--------------+ |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | Notebook Mgr | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | +--------+----------+ |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +----------|---------------------------------+</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +--------------+</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +--------v---------+</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | Notebook Session |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | instance |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> | |</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> +------------------+</span><br></span></code></pre><button type="button" aria-label="Copy code to clipboard" title="Copy" class="copyButton_eDfN clean-btn"><span class="copyButtonIcons_W9eQ" aria-hidden="true"><svg class="copyButtonIcon_XEyF" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_i9w9" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div><p>Once user use Submarine UI to launch a notebook session, Submarine notebook manager inside Submarine Server will persistent notebook session&#x27;s metadata, and launch a new notebook session instance. </p><h3 class="anchor anchorWithStickyNavbar_mojV" id="resource-manager">Resource manager<a class="hash-link" href="#resource-manager" title="Direct link to heading"></a></h3><p>When using K8s as resource manager, Submarine notebook session will run as a new POD.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="storage">Storage<a class="hash-link" href="#storage" title="Direct link to heading"></a></h3><p>There&#x27;re several different types of storage requirements for Submarine notebook. </p><p>For code, environment, etc, storage, please refer to <a href="/zh-cn/docs/next/designDocs/storage-implementation">storage implementation</a>, check &quot;Localization of experiment/notebook/model-serving code&quot;.</p><p>When there&#x27;re needs to attach volume (such as user&#x27;s home folder) to Submarine notebook session, please check <a href="/zh-cn/docs/next/designDocs/storage-implementation">storage implementation</a>, check &quot;Attachable volume&quot;.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="environment">Environment<a class="hash-link" href="#environment" title="Direct link to heading"></a></h3><p>Submarine notebook&#x27;s environment should be used to run experiment, model serving, etc. Please check <a href="/zh-cn/docs/next/designDocs/environments-implementation">environment implementation</a>. (More specific to notebook, please check &quot;How to implement to make user can easily use Submarine environments&quot;)</p><p>Please note that notebook&#x27;s Environment should include right version of notebook libraries, and admin should follow the guidance to build correct Docker image, Conda libraries to correctly run Notebook.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="submarine-sdk-for-experiment-etc">Submarine SDK (For Experiment, etc.)<a class="hash-link" href="#submarine-sdk-for-experiment-etc" title="Direct link to heading"></a></h3><p>Users can run new experiment, access metrics information, or do model operations using Submarine SDK. </p><p>Submarine SDK is a Python library which can talk to Submarine Server which need Submarine Server&#x27;s endpoint as well as user credentials.</p><p>To ensure better experience, we recommend always install proper version of Submarine SDK from environment which users can use Submarine SDK directly from commandline. (We as Submarine community can provide sample Dockerfile or Conda environment which have correct base libraries installed for Submarine SDK).</p><p>Submarine Server IP will be configured automatically by Submarine Server, and added as an envar when Submarine notebook session got launched.</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="security">Security<a class="hash-link" href="#security" title="Direct link to heading"></a></h3><p>Please refer to <a href="/zh-cn/docs/next/designDocs/wip-designs/security-implementation">Security Implementation</a></p><p>Once user accessed to a running notebook session, the user can also access resources of the notebook, capability of submit new experiment, and access data. This is also very dangerous so we have to protect it. </p><p>A simple solution is to use token-based authentication <a href="https://jupyter-notebook.readthedocs.io/en/stable/security.html" target="_blank" rel="noopener noreferrer">https://jupyter-notebook.readthedocs.io/en/stable/security.html</a>. A more common way is to use solutions like KNOX to support SSO. </p><p>We need expand this section to more details. (TODO).</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/submarine/edit/master/website/docs/designDocs/notebook-implementation.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_dcUD" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_foO9"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/zh-cn/docs/next/designDocs/experiment-implementation"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Experiment Implementation</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/zh-cn/docs/next/designDocs/storage-implementation"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Storage Implementation</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#overview" class="table-of-contents__link toc-highlight">Overview</a><ul><li><a href="#users-interaction" class="table-of-contents__link toc-highlight">User&#39;s interaction</a></li><li><a href="#admins-interaction" class="table-of-contents__link toc-highlight">Admin&#39;s interaction</a></li></ul></li><li><a href="#relationship-with-other-components" class="table-of-contents__link toc-highlight">Relationship with other components</a><ul><li><a href="#metadata-store" class="table-of-contents__link toc-highlight">Metadata store</a></li><li><a href="#submarine-server" class="table-of-contents__link toc-highlight">Submarine Server</a></li><li><a href="#resource-manager" class="table-of-contents__link toc-highlight">Resource manager</a></li><li><a href="#storage" class="table-of-contents__link toc-highlight">Storage</a></li><li><a href="#environment" class="table-of-contents__link toc-highlight">Environment</a></li><li><a href="#submarine-sdk-for-experiment-etc" class="table-of-contents__link toc-highlight">Submarine SDK (For Experiment, etc.)</a></li><li><a href="#security" class="table-of-contents__link toc-highlight">Security</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">文档</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/gettingStarted/quickstart">入门教程</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/api/environment">API 文档</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/apache-submarine" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://s.apache.org/slack-invite" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">更多</div><ul class="footer__items"><li class="footer__item"><a href="https://medium.com/@apache.submarine" target="_blank" rel="noopener noreferrer" class="footer__link-item">博客</a></li><li class="footer__item"><a href="https://github.com/apache/submarine" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_I5OW"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="footerLogoLink_gHmE"><img src="https://hadoop.apache.org/asf_logo_wide.png" alt="Apache Open Source Logo" class="themedImage_W2Cr themedImage--light_TfLj footer__logo"><img src="https://hadoop.apache.org/asf_logo_wide.png" alt="Apache Open Source Logo" class="themedImage_W2Cr themedImage--dark_oUvU footer__logo"></a></div><div class="footer__copyright">Apache Submarine, Submarine, Apache, the Apache feather logo, and the Apache Submarine project logo are
either registered trademarks or trademarks of the Apache Software Foundation in the United States and other
countries.<br> Copyright © 2023 Apache Submarine is Apache2 Licensed software.</div></div></div></footer></div>
<script src="/zh-cn/assets/js/runtime~main.aaa6cb63.js"></script>
<script src="/zh-cn/assets/js/main.54762d30.js"></script>
</body>
</html>