Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mounts as lists where better.. #45

Open
DerThorsten opened this issue Jan 15, 2024 · 1 comment
Open

mounts as lists where better.. #45

DerThorsten opened this issue Jan 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@DerThorsten
Copy link
Collaborator

DerThorsten commented Jan 15, 2024

I believe mounts as a List where better than comma-separated strings.

with lists I could do the following for three relatively long mounts

jupyter lite build  \
        --XeusAddon.prefix=$XEUS_PYTHON_WASM_ENV_PREFIX 
        --XeusAddon.mounts="$WASM_ENV_PREFIX/lib/python3.11/site-packages/nxtgm:/lib/python3.11/site-packages/nxtgm"
        --XeusAddon.mounts="$WASM_ENV_PREFIX/lib/nxtgm/__extra__/:/lib/"
        --XeusAddon.mounts="$WASM_ENV_PREFIX/lib/nxtgm/plugins:/lib/nxtgm/plugins"

With the comma separated this looks like the follwoing (horrible)

jupyter lite build  \
        --XeusAddon.prefix=$XEUS_PYTHON_WASM_ENV_PREFIX 
        --XeusAddon.mounts="$WASM_ENV_PREFIX/lib/python3.11/site-packages/nxtgm:/lib/python3.11/site-packages/nxtgm,XeusAddon.mounts="$WASM_ENV_PREFIX/lib/nxtgm/__extra__/:/lib/,$WASM_ENV_PREFIX/lib/nxtgm/plugins:/lib/nxtgm/plugins"

So to make this somewhat sane with the comma-separated list I have to introduce some variables
and call it with the variables.

MOUNT_PYTHON_PKG="$WASM_ENV_PREFIX/lib/python3.11/site-packages/nxtgm:/lib/python3.11/site-packages/nxtgm"
MOUNT_LIBNXTGM="$WASM_ENV_PREFIX/lib/nxtgm/__extra__/:/lib/"
MOUNT_NXTGM_PLUGINS="$WASM_ENV_PREFIX/lib/nxtgm/plugins:/lib/nxtgm/plugins"

# jupyterlite
jupyter lite build \
        --XeusAddon.prefix=$XEUS_PYTHON_WASM_ENV_PREFIX \
        --XeusAddon.mounts=$MOUNT_PYTHON_PKG,$MOUNT_LIBNXTGM,$MOUNT_NXTGM_PLUGINS

I suggest using a list of strings, and each entry can be comma-separated.
That way we get the best of both worlds

@DerThorsten DerThorsten added the enhancement New feature or request label Jan 15, 2024
@martinRenou
Copy link
Member

Sounds good to me!

@martinRenou martinRenou mentioned this issue Jan 29, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants