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

Set up jupyterhub for alpha-preview #188

Closed
nathanshammah opened this issue May 29, 2020 · 6 comments
Closed

Set up jupyterhub for alpha-preview #188

nathanshammah opened this issue May 29, 2020 · 6 comments
Assignees
Milestone

Comments

@nathanshammah
Copy link
Member

Set up a jupyter hub on UF’s google console. Users will login to their environments.

JupyterLab can be used as start-up environment.

The workshop attendees can find there:

  • One master notebook used as an agenda, with links to different material, such as:
  • Mitiq html documentation.
  • Mitiq source code.
  • One mitiq tutorial.
@nathanshammah nathanshammah self-assigned this May 29, 2020
@willzeng willzeng added this to the Alpha v3 milestone May 29, 2020
@nathanshammah
Copy link
Member Author

nathanshammah commented Jun 9, 2020

This is done. I set up a jupyterhub with jupyter lab as default framework, updating the hosted version to mitiq v0.1a1 and building the html docs, for all users. This is found in the my_shared_data folder, which is a read only folder, although the users can use the rest of the home path to add notebooks or scripts.

We agreed upon having the getting started from the docs as tutorial. The only problem is that html files do not render well in jupyter notebooks or in jupyter lab. There may be some css information missing or something like that, so that, for example, the rtd_theme we use for the docs does not render, and we see only a bare text html. This can be only partly solved by using, inside a notebook,

from IPython.core.display import display, HTML
display(HTML('guide/guide_02-getting-started.html'))

as this option still can make some visualization issues. Also, links are not clickable within a jupyter notebook. Of course rendering an html should not be a problem on a server, but we interface with it directly through jupyterhub.

My advice is as following:

  • copy the Getting Started in the form of a notebook or script.
  • add the html docs as zipped file, both online and in an email, so that they can be rendered locally by the workshop users.
    Thanks to @andreamari for help with troubleshooting.

@andreamari
Copy link
Member

A simple option to share the html docs, while keeping mitiq private, could be GitHub Pages:
https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source

@nathanshammah
Copy link
Member Author

I like this suggestion, @andreamari. Interested in what @willzeng and @rmlarose think. To avoid issues, I am playing with this feature (publishing a github pages website on a private repo referring to the docs/ folder only) on my private fork, where I removed docs/build from the .gitignore file and pushed the build.

The outcome should be visible at https://nathanshammah.github.io/mitiq/. This is not working right now, even if I chose a Jekyll theme, as suggested on the Github community forum. An open issue seems to pinpoint the incompatibility with sphinx directory choice. The workaround seems to add a mock index.html file in docs/, pointing at the docs/build, and/or change the BUILDDIR in the make file. I am going to give a try to this.

@nathanshammah
Copy link
Member Author

This tweak worked for me. Have a look now: https://nathanshammah.github.io/mitiq.

This is satisfying as it is for me, and closes the issue for me. I'm fine even in letting my personal website link to this in the workshop. And we can tear it down afterwards. I'd need to check that the current master is synced with the alpha-release branch that we have built on the jupyterhub.

By the way: before adding the .nojekyll file, I was getting only the raw html on the github pages website, just as it looked like, @andreamari, on the JupyterLab on our JupyterHub. So I am wondering whether we just need to tweak something similar to a .nojekyll file, or the .gitignore, or something else, also there. In that case we may be able to see the docs from jupyterlab, maybe. But we were still getting some "Forbidden" errors when clicking some of the links, so maybe that's not practical, and this solution is the best.

@nathanshammah
Copy link
Member Author

Have a look at this super lean style: https://nathanshammah.github.io/mitiq/build/html/guide/guide_02-getting-started.html
What do you think? It's very modern and crisp.

@willzeng
Copy link
Contributor

These docs look great @nathanshammah I like that theme a lot

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

No branches or pull requests

3 participants