3

Is it possible to save a copy of a Jupyter notebook in a different directory?

My scenario is as such: I have jupyterhub set up using the docker spawner to create jupyter containers for users. I want all of these users to have access to a shared notebook, which contains a template for certain types of work. This notebook is served via a read-only volume mount into a /shared directory under /work. Users should then be able to modify and save a copy into the parent directory, to which they have access. However, the 'make a copy' function seems to only want to make a copy in the same directory, which is of course read only. Is there a way to change this functionality?

Alternate solutions also welcome!

(For reference, this is using the r-notebook kernel, but I doubt that makes a difference)

Impredicative
  • 5,039
  • 1
  • 17
  • 43

1 Answers1

-1

You can use the nbexamples extension

It accomplishes the same task.

You can specify the reviewed directory of nbexamples as your shared read-only directory.

Users will be able to fetch a copy and the copy will get stored inside home directory of user.

sat
  • 603
  • 3
  • 6
  • FTR: `nbexamples` basically makes usage of the default python function `shutil.copyfile(src, dest)` – Jaleks Jun 24 '20 at 21:38