File Management

The file browser and File menu enable you to work with files and directories on your system. This includes opening, creating, deleting, renaming, downloading, copying, and sharing files and directories.

The file browser is in the left sidebar Files tab:

Arrow pointing to the file browser in the upper left sidebar

Many actions on files can also be carried out in the File menu:

A screenshot showing the File menu open including options like "New", "Save All."

Open file

To open any file, double-click on its name in the file browser:

New tab

You can also drag a file into the main work area to create a new tab:

Multiple Viewers

Many files types have multiple viewers/editors. For example, you can open a Markdown file in a text editor or as rendered HTML. A JupyterLab extension can also add new viewers/editors for files. To open a file in a non-default viewer/editor, right-click on its name in the file browser and use the “Open With…” submenu to select the viewer/editor:

Single Doc Sync

A single file can be open simultaneously in multiple viewer/editors and they will remain in sync:

File Navigation

The file system can be navigated by double-clicking on folders in the listing or clicking on the folders at the top of the directory listing:

Share file

Right-click on a file or directory and select “Copy Shareable Link” to copy a URL that can be used to open JupyterLab with that file or directory open.

A screenshot showing the Copy Shareable Link option in the context menu opened over a file, which is the last entry on the list.

Copy File Path

Right-click on a file or directory and select “Copy Path” to copy the filesystem relative path. This can be used for passing arguments to open files in functions called in various kernels.

Important folders

While working in Notebooks, it is important to keep in mind the folder structure. After launching Polus Notebook JupyterLab server, you will see two folders in the file browser on the left: shared and work.

  • shared folder is the symbolic link to /opt/shared, which is reserved for shared storage across all apps. You may find the following folders inside of shared:

    • notebooks is the shared folder for all users of notebooks across the deployemnt. That allows to store common notebooks, code and datasets and collaborate on them with other users of Notebooks

    • compute (if Polus Compute is enabled on your cluster) contains file storage for Compute API. You may upload datasets and use them from both Compute and Notebooks

  • work is the users’ persistent storage. All files in that folder will persist the notebook restarts and is the place to keep your work.

All the files and folders created outside of shared and work will be deleted on notebook restart, which happen after a period of inactivity (usually 10 hours).

File uploads

To upload a file, click on the upload button in file panel on the left:

anaconda_cloud_1

You can upload multiple files, but you cannot upload folders. Workaround for uploading folders is to use Git integration or creating archive and uploading it and later unarchiving.

File downloads

To download file, right-click on it in the Files panel on the left

anaconda_cloud_1

You can not download multiple files at once. You can not download folders. As a workaround, put your files/folders to archive and then download archive.

Deleting folders

To protect users from accidentaly deleting the folder, JupyterLab made a decision to block non-empty folder deletion with right-click (https://github.com/jupyterlab/jupyterlab/issues/835). Unfortunately, until the issue is fixed, you would have to delete everything from inside the folder manually or use the Termianl to delete the folder. In Terminal you can run the command: rm -rf <folder_path> to delete the folder.