jupyterhub

jupyterhub/jupyterhub Docker Image

自动构建

JupyterHub是一款支持多用户的Jupyter笔记本服务器,它能为多个用户提供独立的交互式计算环境,允许用户通过网页浏览器访问并运行Jupyter笔记本,广泛应用于教学、科研团队协作及企业数据科学项目,方便管理员集中管理用户账户、分配资源和维护计算环境,确保不同用户在共享服务器资源时既能高效协作又能保持各自工作的独立性与安全性。

348 次收藏下载次数: 0状态:自动构建维护者:jupyterhub仓库类型:镜像最近更新:
下载命令
点击查看

Technical Overview | Installation | Configuration | Docker | Contributing | License | Help and Resources


https://github.com/jupyterhub/jupyterhub

With https://jupyterhub.readthedocs.io you can create a multi-user Hub that spawns, manages, and proxies multiple instances of the single-user https://jupyter-notebook.readthedocs.io server.

https://jupyter.org created JupyterHub to support many users. The Hub can offer notebook servers to a class of students, a corporate data science workgroup, a scientific research project, or a high-performance computing group.

Technical overview

Three main actors make up JupyterHub:

  • multi-user Hub (tornado process)
  • configurable http proxy (node-http-proxy)
  • multiple single-user Jupyter notebook servers (Python/Jupyter/tornado)

Basic principles for operation are:

  • Hub launches a proxy.
  • The Proxy forwards all requests to Hub by default.
  • Hub handles login and spawns single-user servers on demand.
  • Hub configures proxy to forward URL prefixes to the single-user notebook servers.

JupyterHub also provides a https://jupyterhub.readthedocs.io/en/latest/reference/rest-api.html for administration of the Hub and its users.

Installation

Check prerequisites

  • A Linux/Unix based system

  • https://www.python.org/downloads/ 3.8 or greater

  • https://www.npmjs.com/

    • If you are using conda, the nodejs and npm dependencies will be installed for you by conda.

    • If you are using pip, install a recent version (at least 12.0) of https://docs.npmjs.com/getting-started/installing-node.

  • If using the default PAM Authenticator, a pluggable authentication module (PAM).

  • TLS certificate and key for HTTPS communication

  • Domain name

Install packages

Using conda

To install JupyterHub along with its dependencies including nodejs/npm:

bash
conda install -c conda-forge jupyterhub

If you plan to run notebook servers locally, install JupyterLab or Jupyter notebook:

bash
conda install jupyterlab
conda install notebook

Using pip

JupyterHub can be installed with pip, and the proxy with npm:

bash
npm install -g configurable-http-proxy
python3 -m pip install jupyterhub

If you plan to run notebook servers locally, you will need to install https://jupyter.readthedocs.io/en/latest/install.html:

python3 -m pip install --upgrade jupyterlab
python3 -m pip install --upgrade notebook

Run the Hub server

To start the Hub server, run the command:

jupyterhub

Visit http://localhost:8000 in your browser, and sign in with your system username and password.

Note: To allow multiple users to sign in to the server, you will need to run the jupyterhub command as a privileged user, such as root. The https://github.com/jupyterhub/jupyterhub/wiki/Using-sudo-to-run-JupyterHub-without-root-privileges describes how to run the server as a less privileged user, which requires more configuration of the system.

Configuration

The https://jupyterhub.readthedocs.io/en/latest/tutorial/index.html#getting-started section of the documentation explains the common steps in setting up JupyterHub.

The https://github.com/jupyterhub/jupyterhub-tutorial provides an in-depth video and sample configurations of JupyterHub.

Create a configuration file

To generate a default config file with settings and descriptions:

jupyterhub --generate-config

Start the Hub

To start the Hub on a specific url and port 10.0.1.2:443 with https:

jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert

Authenticators

AuthenticatorDescription
PAMAuthenticatorDefault, built-in authenticator
https://github.com/jupyterhub/oauthenticatorOAuth + JupyterHub Authenticator = OAuthenticator
https://github.com/jupyterhub/ldapauthenticatorSimple LDAP Authenticator Plugin for JupyterHub
https://github.com/jupyterhub/kerberosauthenticatorKerberos Authenticator Plugin for JupyterHub

Spawners

SpawnerDescription
LocalProcessSpawnerDefault, built-in spawner starts single-user servers as local processes
https://github.com/jupyterhub/dockerspawnerSpawn single-user servers in Docker containers
https://github.com/jupyterhub/kubespawnerKubernetes spawner for JupyterHub
https://github.com/jupyterhub/sudospawnerSpawn single-user servers without being root
https://github.com/jupyterhub/systemdspawnerSpawn single-user notebook servers using systemd
https://github.com/jupyterhub/batchspawnerDesigned for clusters using batch scheduling software
https://github.com/jupyterhub/yarnspawnerSpawn single-user notebook servers distributed on a Hadoop cluster
https://github.com/jupyterhub/wrapspawnerWrapSpawner and ProfilesSpawner enabling runtime configuration of spawners

Docker

A starter https://quay.io/repository/jupyterhub/jupyterhub gives a baseline deployment of JupyterHub using Docker.

Important: This quay.io/jupyterhub/jupyterhub image contains only the Hub itself, with no configuration. In general, one needs to make a derivative image, with at least a jupyterhub_config.py setting up an Authenticator and/or a Spawner. To run the single-user servers, which may be on the same system as the Hub or not, Jupyter Notebook version 4 or greater must be installed.

The JupyterHub docker image can be started with the following command:

docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub

This command will create a container named jupyterhub that you can stop and resume with docker stop/start.

The Hub service will be listening on all interfaces at port 8000, which makes this a good choice for testing JupyterHub on your desktop or laptop.

If you want to run docker on a computer that has a public IP then you should (as in MUST) secure it with ssl by adding ssl options to your docker configuration or by using an ssl enabled proxy.

https://docs.docker.com/engine/admin/volumes/volumes/ will allow you to store data outside the docker image (host system) so it will be persistent, even when you start a new image.

The command docker exec -it jupyterhub bash will spawn a root shell in your docker container. You can use the root shell to create system users in the container. These accounts will be used for authentication in JupyterHub's default configuration.

Contributing

If you would like to contribute to the project, please read our https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html and the CONTRIBUTING.md. The CONTRIBUTING.md file explains how to set up a development installation, how to run the test suite, and how to contribute to documentation.

For a high-level view of the vision and next directions of the project, see the JupyterHub community roadmap.

A note about platform support

JupyterHub is supported on Linux/Unix based systems.

JupyterHub officially does not support Windows. You may be able to use JupyterHub on Windows if you use a Spawner and Authenticator that work on Windows, but the JupyterHub defaults will not. Bugs reported on Windows will not be accepted, and the test suite will not run on Windows. Small patches that fix minor Windows compatibility issues (such as basic installation) may be accepted, however. For Windows-based systems, we would recommend running JupyterHub in a docker container or Linux VM.

Additional Reference: Tornado's documentation on Windows platform support

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

All code is licensed under the terms of the revised BSD license.

Help and resources

We encourage you to ask questions and share ideas on the https://discourse.jupyter.org/. You can also talk with us on our JupyterHub https://gitter.im/jupyterhub/jupyterhub channel.

  • https://github.com/jupyterhub/jupyterhub/issues
  • https://github.com/jupyterhub/jupyterhub-tutorial
  • https://jupyterhub.readthedocs.io/en/latest/
  • https://jupyterhub.readthedocs.io/en/latest/reference/rest-api.html
  • http://jupyter.readthedocs.io/en/latest/index.html
  • https://jupyter.org
  • https://jupyter.org/community

JupyterHub follows the Jupyter https://jupyter.readthedocs.io/en/latest/community/content-community.html.


Technical Overview | Installation | Configuration | Docker | Contributing | License | Help and Resources

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 jupyterhub 镜像标签

docker pull docker.xuanyuan.run/jupyterhub/jupyterhub:<标签>

DockerHub 原生拉取命令

docker pull jupyterhub/jupyterhub:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告