Skip to content

Commit

Permalink
Automatically mount jupyterlite content when using voici
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Jan 25, 2024
1 parent cd00e3f commit 7dcea9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jupyterlite_xeus/add_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class XeusAddon(FederatedExtensionAddon):
)

mount_jupyterlite_content = Bool(
False,
None,
allow_none=True,
config=True,
description="Whether or not to mount the jupyterlite content into the kernel. This allows bypassing the file-system core JupyterLite implementation.",
)
Expand Down Expand Up @@ -329,7 +330,10 @@ def pack_prefix(self, kernel_dir):
)

# Pack JupyterLite content if enabled
if self.mount_jupyterlite_content:
# If we only build a voici output, mount jupyterlite content into the kernel by default
if self.mount_jupyterlite_content or (
manager.apps == ["voici"] and self.mount_jupyterlite_content is None
):
contents_dir = self.manager.output_dir / "files"

outname = f"mount_{len(self.mounts)}.tar.gz"
Expand Down

0 comments on commit 7dcea9a

Please sign in to comment.