diff --git a/official-templates/pytorch/Dockerfile b/official-templates/pytorch/Dockerfile index 275ead7..125e736 100644 --- a/official-templates/pytorch/Dockerfile +++ b/official-templates/pytorch/Dockerfile @@ -44,6 +44,7 @@ RUN pip install --upgrade --no-cache-dir jupyterlab ipywidgets jupyter-archive j RUN pip install notebook==6.5.5 RUN jupyter contrib nbextension install --user && \ jupyter nbextension enable --py widgetsnbextension +COPY jupyter/shortcuts.jupyterlab-settings /root/.jupyter/lab/user-settings/@jupyterlab/shortcuts-extension/shortcuts.jupyterlab-settings # Remove existing SSH host keys RUN rm -f /etc/ssh/ssh_host_* diff --git a/official-templates/pytorch/jupyter/shortcuts.jupyterlab-settings b/official-templates/pytorch/jupyter/shortcuts.jupyterlab-settings new file mode 100644 index 0000000..b1f1420 --- /dev/null +++ b/official-templates/pytorch/jupyter/shortcuts.jupyterlab-settings @@ -0,0 +1,983 @@ +{ + "shortcuts": [ + { + "command": "application:activate-next-tab", + "keys": [ + "Ctrl Shift ]" + ], + "selector": "body", + "args": {} + }, + { + "command": "notebook:clear-cell-output", + "keys": [ + "Cmd Shift C" + ], + "selector": "body", + "args": {} + }, + { + "command": "application:activate-next-tab-bar", + "keys": [ + "Ctrl Shift ." + ], + "selector": "body", + "args": {} + }, + { + "command": "application:activate-previous-tab", + "keys": [ + "Ctrl Shift [" + ], + "selector": "body", + "args": {} + }, + { + "command": "application:activate-previous-tab-bar", + "keys": [ + "Ctrl Shift ," + ], + "selector": "body", + "args": {} + }, + { + "command": "application:close", + "keys": [ + "Alt W" + ], + "selector": ".jp-Activity", + "args": {} + }, + { + "command": "application:toggle-left-area", + "keys": [ + "Accel B" + ], + "selector": "body", + "args": {} + }, + { + "command": "application:toggle-mode", + "keys": [ + "Accel Shift D" + ], + "selector": "body", + "args": {} + }, + { + "command": "apputils:display-shortcuts", + "keys": [ + "Accel Shift H" + ], + "selector": "body", + "args": {} + }, + { + "command": "apputils:print", + "keys": [ + "Accel P" + ], + "selector": "body", + "args": {} + }, + { + "command": "completer:invoke-console", + "keys": [ + "Tab" + ], + "selector": ".jp-CodeConsole-promptCell .jp-mod-completer-enabled", + "args": {} + }, + { + "command": "completer:invoke-file", + "keys": [ + "Tab" + ], + "selector": ".jp-FileEditor .jp-mod-completer-enabled", + "args": {} + }, + { + "command": "completer:invoke-notebook", + "keys": [ + "Tab" + ], + "selector": ".jp-Notebook.jp-mod-editMode .jp-mod-completer-enabled", + "args": {} + }, + { + "command": "console:linebreak", + "keys": [ + "Enter" + ], + "selector": ".jp-CodeConsole[data-jp-interaction-mode='notebook'] .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "console:linebreak", + "keys": [ + "Accel Enter" + ], + "selector": ".jp-CodeConsole[data-jp-interaction-mode='terminal'] .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "console:run-forced", + "keys": [ + "Shift Enter" + ], + "selector": ".jp-CodeConsole[data-jp-interaction-mode='notebook'] .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "console:run-forced", + "keys": [ + "Shift Enter" + ], + "selector": ".jp-CodeConsole[data-jp-interaction-mode='terminal'] .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "console:run-unforced", + "keys": [ + "Enter" + ], + "selector": ".jp-CodeConsole[data-jp-interaction-mode='terminal'] .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "debugger:continue", + "keys": [ + "F9" + ], + "selector": "body", + "args": {} + }, + { + "command": "debugger:next", + "keys": [ + "F10" + ], + "selector": "body", + "args": {} + }, + { + "command": "debugger:show-panel", + "keys": [ + "Accel Shift E" + ], + "selector": "body", + "args": {} + }, + { + "command": "debugger:stepIn", + "keys": [ + "F11" + ], + "selector": "body", + "args": {} + }, + { + "command": "debugger:stepOut", + "keys": [ + "Shift F11" + ], + "selector": "body", + "args": {} + }, + { + "command": "debugger:terminate", + "keys": [ + "Shift F9" + ], + "selector": "body", + "args": {} + }, + { + "command": "docmanager:save", + "keys": [ + "Accel S" + ], + "selector": "body", + "args": {} + }, + { + "command": "docmanager:save-as", + "keys": [ + "Accel Shift S" + ], + "selector": "body", + "args": {} + }, + { + "command": "documentsearch:end", + "keys": [ + "Escape" + ], + "selector": ".jp-mod-searchable", + "args": {} + }, + { + "command": "documentsearch:highlightNext", + "keys": [ + "Accel G" + ], + "selector": ".jp-mod-searchable", + "args": {} + }, + { + "command": "documentsearch:highlightPrevious", + "keys": [ + "Accel Shift G" + ], + "selector": ".jp-mod-searchable", + "args": {} + }, + { + "command": "documentsearch:start", + "keys": [ + "Accel F" + ], + "selector": ".jp-mod-searchable", + "args": {} + }, + { + "command": "editmenu:redo", + "keys": [ + "Accel Shift Z" + ], + "selector": "[data-jp-undoer]", + "args": {} + }, + { + "command": "editmenu:undo", + "keys": [ + "Accel Z" + ], + "selector": "[data-jp-undoer]", + "args": {} + }, + { + "command": "extensionmanager:show-panel", + "keys": [ + "Accel Shift X" + ], + "selector": "body", + "args": {} + }, + { + "command": "filebrowser:copy", + "keys": [ + "Accel C" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:cut", + "keys": [ + "Accel X" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:delete", + "keys": [ + "Delete" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:duplicate", + "keys": [ + "Accel D" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:go-up", + "keys": [ + "Backspace" + ], + "selector": ".jp-DirListing:focus", + "args": {} + }, + { + "command": "filebrowser:go-up", + "keys": [ + "Backspace" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:paste", + "keys": [ + "Accel V" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:rename", + "keys": [ + "F2" + ], + "selector": ".jp-DirListing-content .jp-DirListing-itemText", + "args": {} + }, + { + "command": "filebrowser:toggle-main", + "keys": [ + "Accel Shift F" + ], + "selector": "body", + "args": {} + }, + { + "command": "filemenu:close-and-cleanup", + "keys": [ + "Ctrl Shift Q" + ], + "selector": ".jp-Activity", + "args": {} + }, + { + "command": "imageviewer:flip-horizontal", + "keys": [ + "H" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:flip-vertical", + "keys": [ + "V" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:invert-colors", + "keys": [ + "I" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:reset-image", + "keys": [ + "0" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:rotate-clockwise", + "keys": [ + "]" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:rotate-counterclockwise", + "keys": [ + "[" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:zoom-in", + "keys": [ + "=" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "imageviewer:zoom-out", + "keys": [ + "-" + ], + "selector": ".jp-ImageViewer", + "args": {} + }, + { + "command": "inspector:close", + "keys": [ + "Accel I" + ], + "selector": "body[data-jp-inspector='open']", + "args": {} + }, + { + "command": "inspector:open", + "keys": [ + "Accel I" + ], + "selector": "body", + "args": {} + }, + { + "command": "kernelmenu:interrupt", + "keys": [ + "I", + "I" + ], + "selector": "[data-jp-kernel-user]:focus", + "args": {} + }, + { + "command": "kernelmenu:restart", + "keys": [ + "0", + "0" + ], + "selector": "[data-jp-kernel-user]:focus", + "args": {} + }, + { + "command": "launcher:create", + "keys": [ + "Accel Shift L" + ], + "selector": "body", + "args": {} + }, + { + "command": "notebook:change-cell-to-code", + "keys": [ + "Y" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-1", + "keys": [ + "1" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-2", + "keys": [ + "2" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-3", + "keys": [ + "3" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-4", + "keys": [ + "4" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-5", + "keys": [ + "5" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-heading-6", + "keys": [ + "6" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-markdown", + "keys": [ + "M" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:change-cell-to-raw", + "keys": [ + "R" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:collapse-all-headings", + "keys": [ + "Ctrl Shift ArrowLeft" + ], + "selector": ".jp-Notebook.jp-mod-commandMode", + "args": {} + }, + { + "command": "notebook:copy-cell", + "keys": [ + "C" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:cut-cell", + "keys": [ + "X" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:delete-cell", + "keys": [ + "D", + "D" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:enter-command-mode", + "keys": [ + "Escape" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:enter-command-mode", + "keys": [ + "Ctrl M" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:enter-edit-mode", + "keys": [ + "Enter" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:expand-all-headings", + "keys": [ + "Ctrl Shift ArrowRight" + ], + "selector": ".jp-Notebook.jp-mod-commandMode", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-above", + "keys": [ + "Shift ArrowUp" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-above", + "keys": [ + "Shift K" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-below", + "keys": [ + "Shift ArrowDown" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-below", + "keys": [ + "Shift J" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-bottom", + "keys": [ + "Shift End" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:extend-marked-cells-top", + "keys": [ + "Shift Home" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:insert-cell-above", + "keys": [ + "A" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:insert-cell-below", + "keys": [ + "B" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:insert-heading-above", + "keys": [ + "Shift A" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:insert-heading-below", + "keys": [ + "Shift B" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:merge-cell-above", + "keys": [ + "Ctrl Backspace" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:merge-cell-below", + "keys": [ + "Ctrl Shift M" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:merge-cells", + "keys": [ + "Shift M" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:move-cell-down", + "keys": [ + "Ctrl Shift ArrowDown" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:move-cell-up", + "keys": [ + "Ctrl Shift ArrowUp" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:move-cursor-down", + "keys": [ + "ArrowDown" + ], + "selector": "[data-jp-traversable]:focus", + "args": {} + }, + { + "command": "notebook:move-cursor-down", + "keys": [ + "J" + ], + "selector": "[data-jp-traversable]:focus", + "args": {} + }, + { + "command": "notebook:move-cursor-heading-above-or-collapse", + "keys": [ + "ArrowLeft" + ], + "selector": ".jp-Notebook:focus.jp-mod-commandMode", + "args": {} + }, + { + "command": "notebook:move-cursor-heading-below-or-expand", + "keys": [ + "ArrowRight" + ], + "selector": ".jp-Notebook:focus.jp-mod-commandMode", + "args": {} + }, + { + "command": "notebook:move-cursor-up", + "keys": [ + "ArrowUp" + ], + "selector": "[data-jp-traversable]:focus", + "args": {} + }, + { + "command": "notebook:move-cursor-up", + "keys": [ + "K" + ], + "selector": "[data-jp-traversable]:focus", + "args": {} + }, + { + "command": "notebook:paste-cell-below", + "keys": [ + "V" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:redo-cell-action", + "keys": [ + "Shift Z" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:run-cell", + "keys": [], + "macKeys": [ + "Ctrl Enter" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:run-cell", + "keys": [], + "macKeys": [ + "Ctrl Enter" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:run-cell", + "keys": [ + "Accel Enter" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:run-cell", + "keys": [ + "Accel Enter" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:run-cell-and-insert-below", + "keys": [ + "Alt Enter" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:run-cell-and-insert-below", + "keys": [ + "Alt Enter" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:run-cell-and-select-next", + "keys": [ + "Shift Enter" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:select-all", + "keys": [ + "Accel A" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "property-inspector:show-panel", + "keys": [ + "Accel Shift U" + ], + "macKeys": [ + "Ctrl Enter" + ], + "selector": "body", + "args": {} + }, + { + "command": "runmenu:run", + "keys": [ + "Shift Enter" + ], + "macKeys": [ + "Ctrl Enter" + ], + "selector": "[data-jp-code-runner]", + "args": {} + }, + { + "command": "running:show-panel", + "keys": [ + "Accel Shift B" + ], + "selector": "body", + "args": {} + }, + { + "command": "settingeditor:open", + "keys": [ + "Accel ," + ], + "selector": "body", + "args": {} + }, + { + "command": "settingeditor:save", + "keys": [ + "Accel S" + ], + "selector": ".jp-SettingEditor", + "args": {} + }, + { + "command": "tabsmenu:activate-previously-used-tab", + "keys": [ + "Accel Shift '" + ], + "selector": "body", + "args": {} + }, + { + "command": "toc:show-panel", + "keys": [ + "Accel Shift K" + ], + "selector": "body", + "args": {} + }, + { + "command": "tooltip:dismiss", + "keys": [ + "Escape" + ], + "selector": "body.jp-mod-tooltip .jp-Notebook", + "args": {} + }, + { + "command": "tooltip:dismiss", + "keys": [ + "Escape" + ], + "selector": "body.jp-mod-tooltip .jp-CodeConsole-promptCell", + "args": {} + }, + { + "command": "tooltip:launch-console", + "keys": [ + "Shift Tab" + ], + "selector": ".jp-CodeConsole-promptCell .jp-InputArea-editor:not(.jp-mod-has-primary-selection):not(.jp-mod-in-leading-whitespace)", + "args": {} + }, + { + "command": "tooltip:launch-file", + "keys": [ + "Shift Tab" + ], + "selector": ".jp-FileEditor .jp-CodeMirrorEditor:not(.jp-mod-has-primary-selection):not(.jp-mod-in-leading-whitespace)", + "args": {} + }, + { + "command": "tooltip:launch-notebook", + "keys": [ + "Shift Tab" + ], + "selector": ".jp-Notebook.jp-mod-editMode .jp-InputArea-editor:not(.jp-mod-has-primary-selection):not(.jp-mod-in-leading-whitespace):not(.jp-mod-completer-active)", + "args": {} + }, + { + "command": "viewmenu:line-numbering", + "keys": [ + "Shift L" + ], + "selector": ".jp-Notebook.jp-mod-commandMode", + "args": {} + }, + { + "command": "notebook:split-cell-at-cursor", + "keys": [ + "Ctrl Shift -" + ], + "selector": ".jp-Notebook.jp-mod-editMode", + "args": {} + }, + { + "command": "notebook:toggle-all-cell-line-numbers", + "keys": [ + "Shift L" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:toggle-render-side-by-side-current", + "keys": [ + "Shift R" + ], + "selector": ".jp-Notebook:focus", + "args": {} + }, + { + "command": "notebook:undo-cell-action", + "keys": [ + "Z" + ], + "selector": ".jp-Notebook:focus", + "args": {} + } + ] +} \ No newline at end of file