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

issue running ./restart_demo.sh demo_one_class_one_grader #1785

Open
bpfrd opened this issue May 11, 2023 · 4 comments
Open

issue running ./restart_demo.sh demo_one_class_one_grader #1785

bpfrd opened this issue May 11, 2023 · 4 comments
Labels

Comments

@bpfrd
Copy link

bpfrd commented May 11, 2023

Hello,

I get the following error while running the script provided in demos folder ./restart_demo.sh demo_one_class_one_grader

  • jupyter nbextension install --symlink --sys-prefix --py nbgrader --overwrite
    Traceback (most recent call last):
    File "/usr/local/bin/jupyter-nbextension", line 8, in
    sys.exit(main())
    File "/usr/local/lib/python3.9/dist-packages/jupyter_core/application.py", line 277, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
    File "/usr/local/lib/python3.9/dist-packages/traitlets/config/application.py", line 1043, in launch_instance
    app.start()
    File "/usr/local/lib/python3.9/dist-packages/notebook/nbextensions.py", line 972, in start
    super().start()
    File "/usr/local/lib/python3.9/dist-packages/jupyter_core/application.py", line 266, in start
    self.subapp.start()
    File "/usr/local/lib/python3.9/dist-packages/notebook/nbextensions.py", line 702, in start
    self.install_extensions()
    File "/usr/local/lib/python3.9/dist-packages/notebook/nbextensions.py", line 675, in install_extensions
    full_dests = install(self.extra_args[0],
    File "/usr/local/lib/python3.9/dist-packages/notebook/nbextensions.py", line 203, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
    File "/usr/local/lib/python3.9/dist-packages/notebook/nbextensions.py", line 1107, in _get_nbextension_metadata
    m = import_item(module)
    File "/usr/local/lib/python3.9/dist-packages/traitlets/utils/importstring.py", line 38, in import_item
    return import(parts[0])
    ModuleNotFoundError: No module named 'nbgrader'

When I run the mentioned script for the second time, it works! Here is the Dockerfile where I set up the environment:
FROM node:latest

RUN apt-get update && apt-get upgrade -y &&
apt-get install -y sudo vim

RUN mkdir /srv/nbgrader-dir

WORKDIR /srv/nbgrader-dir

RUN git clone https://github.com/jupyter/nbgrader.git .

RUN cp demos/formgrader_workspace.json /root

EXPOSE 8000

CMD ["/bin/bash"]

best regards

@bpfrd
Copy link
Author

bpfrd commented May 11, 2023

Sorry, I just saw the Dockerfile that you already provided in the demos directory and that works perfectly fine. The only question now is that if I want to deploy it what directories should I mount in the dockerfile so that the students' answers and the teacher's data don't get lost?

best regards
behnam

@perllaghu
Copy link
Contributor

The default exchange uses /usr/local/share/nbgrader/exchange as the common directory - and ensure to chmod 777 so everyone can read/write to it.

@bpfrd
Copy link
Author

bpfrd commented May 12, 2023

but is mounting only exchange directory sufficient? don't we need to mount the home directory of students and instructors? for example, if they work on their assignment and don't submit it! if they come back later will the data persist?

@brichet
Copy link
Contributor

brichet commented Mar 21, 2024

@bpfrd did you find answers to your questions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants