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

Should Jupyter notebooks persist to /app/notebooks instead? #104

Open
charlesbmi opened this issue Jul 5, 2023 · 0 comments
Open

Should Jupyter notebooks persist to /app/notebooks instead? #104

charlesbmi opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@charlesbmi
Copy link
Contributor

Describe the bug

The recommended Docker command:
docker run -p 8888:8888 -v $(pwd)/notebooks:/ndk/notebooks -it ghcr.io/agencyenterprise/neurotechdevkit:latest
mounts notebooks to /ndk/notebooks, which makes it inaccessible from the Jupyter Lab server that runs at /app

A simple change is to run with -v $(pwd)/notebooks:/app/notebooks, but I wasn't sure if that should be necessary or if it is better fixed by ensuring that Jupyter opens in the /ndk working directory in a Docker config somewhere.

Steps to reproduce

docker run -p 8888:8888  -v $(pwd)/notebooks:/ndk/notebooks -it ghcr.io/agencyenterprise/neurotechdevkit:latest

Resulting logs:

(base) ➜  neurotechdevkit git:(main) ✗ docker run -p 8888:8888  -v $(pwd)/notebooks:/ndk/notebooks -it ghcr.io/agencyenterprise/neurotechdevkit:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
[I 18:22:59.636 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[W 18:23:06.214 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.
[C 18:23:06.215 NotebookApp] You must use Jupyter Server v1 to load JupyterLab as notebook extension. You have v2.5.0 installed.
    You can fix this by executing:
        pip install -U "jupyter-server<2.0.0"
[I 18:23:06.236 NotebookApp] Serving notebooks from local directory: /app
[I 18:23:06.237 NotebookApp] Jupyter Notebook 6.5.4 is running at:
[I 18:23:06.237 NotebookApp] http://f7749ef3a33b:8888/?token=b87d2340dd376592df3c489eae78f46ea205ce4e72860312
[I 18:23:06.237 NotebookApp]  or http://127.0.0.1:8888/?token=b87d2340dd376592df3c489eae78f46ea205ce4e72860312
[I 18:23:06.237 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 18:23:06.256 NotebookApp] No web browser found: could not locate runnable browser.
[C 18:23:06.257 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///root/.local/share/jupyter/runtime/nbserver-1-open.html
    Or copy and paste one of these URLs:
        http://f7749ef3a33b:8888/?token=b87d2340dd376592df3c489eae78f46ea205ce4e72860312
     or http://127.0.0.1:8888/?token=b87d2340dd376592df3c489eae78f46ea205ce4e72860312

Include a description of your setup including:

  • Docker version: 4.18.0
  • OS version and name: {'system': 'Darwin', 'node': 'Charles-MacBook.local', 'release': '22.5.0', 'version': 'Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000', 'machine': 'arm64', 'processor': 'arm'}

Expected results

See notebooks folder in generated Jupyter Lab server

Actual results

From Jupyter notebook file explorer:
image

From Jupyter notebook shell:

# pwd
/app
# ls /
app  bin  boot  dev  etc  home  lib  lib64  media  mnt  ndk  opt  proc  root  run  sbin  srv  sys  tmp  usr  var  venv
# ls /ndk
notebooks
# ls
CONTRIBUTING.md  LICENSE   README.md    dist                docs        poetry.lock     src
Dockerfile       Makefile  SECURITY.md  docker-compose.yml  mkdocs.yml  pyproject.toml  tests
@charlesbmi charlesbmi added the bug Something isn't working label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant