专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

jupyter/nbviewer Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
nbviewer
jupyter/nbviewer
自动构建
jupyter
用于查看Jupyter Notebook文件的轻量级工具,无需运行完整内核即可展示文档内容,适用于分享和预览场景。
34 次收藏下载次数: 0状态:自动构建维护者:jupyter仓库类型:镜像最近更新:3 个月前
使用轩辕镜像,把时间还给真正重要的事。点击查看
版本下载
使用轩辕镜像,把时间还给真正重要的事。点击查看

Quick Run | GitHub Enterprise | Base URL | Local Development | Contributing | Extensions | Configuration | Security

Jupyter Notebook Viewer

![Latest PyPI version]([] ![TravisCI build status]([] ![GitHub]([] ![Gitter]([]

Jupyter NBViewer is the web application behind The Jupyter Notebook Viewer, which is graciously hosted by OVHcloud.

Run this locally to get most of the features of nbviewer on your own network.

If you need help using or installing Jupyter Notebook Viewer, please use the jupyter/help issue tracker. If you would like to propose an enhancement to nbviewer or file a bug report, please open an issue here, in the jupyter/nbviewer project.

Quick Run

If you have docker installed, you can pull and run the currently built version of the Docker container by

shell
$ docker pull jupyter/nbviewer
$ docker run -p 8080:8080 jupyter/nbviewer

It automatically gets built with each push to master, so you'll always be able to get the freshest copy.

For speed and friendliness to GitHub, be sure to set GITHUB_OAUTH_KEY and GITHUB_OAUTH_SECRET:

shell
$ docker run -p 8080:8080 -e 'GITHUB_OAUTH_KEY=YOURKEY' \
                          -e 'GITHUB_OAUTH_SECRET=YOURSECRET' \
                          jupyter/nbviewer

Or to use your GitHub personal access token, you can just set GITHUB_API_TOKEN.

GitHub Enterprise

To use nbviewer on your own GitHub Enterprise instance you need to set GITHUB_API_URL. The relevant API endpoints for GitHub Enterprise are prefixed with [***]. You must also specify your OAUTH or API_TOKEN as explained above. For example:

shell
$ docker run -p 8080:8080 -e 'GITHUB_OAUTH_KEY=YOURKEY' \
                          -e 'GITHUB_OAUTH_SECRET=YOURSECRET' \
                          -e 'GITHUB_API_URL=[***] \
                          jupyter/nbviewer

With this configured all GitHub API requests will go to your Enterprise instance so you can view all of your internal notebooks.

Base URL

If the environment variable JUPYTERHUB_SERVICE_PREFIX is specified, then NBViewer always uses the value of this environment variable as the base URL.

In the case that there is no value for JUPYTERHUB_SERVICE_PREFIX, then as a backup the value of the --base-url flag passed to the python -m nbviewer command on the command line will be used as the base URL.

Local Development

With Docker

You can build a docker image that uses your local branch.

Build
shell
$ cd <path to repo>
$ docker build -t nbviewer .
Run
shell
$ cd <path to repo>
$ docker run -p 8080:8080 nbviewer
With Docker Compose

The Notebook Viewer uses memcached in production. To locally try out this setup, a docker-compose configuration is provided to easily start/stop the nbviewer and memcached containers together from your current branch. You will need to install docker prior to this.

Run
shell
$ cd <path to repo>
$ pip install docker-compose
$ docker-compose up
Local Installation

The Notebook Viewer requires several binary packages to be installed on your system. The primary ones are libmemcached-dev libcurl4-openssl-dev pandoc libevent-dev libgnutls28-dev. Package names may differ on your system, see salt-states for more details.

If they are installed, you can install the required Python packages via pip.

shell
$ cd <path to repo>
$ pip install -r requirements.txt
Static Assets

Static assets are maintained with bower and less (which require having npm installed), and the invoke python module.

shell
$ cd <path to repo>
$ pip install -r requirements-dev.txt
$ npm install
$ invoke bower
$ invoke less [-d]

This will download the relevant assets into nbviewer/static/components and create the built assets in nbviewer/static/build.

Pass -d or --debug to invoke less to create a CSS sourcemap, useful for debugging.

Running Locally
shell
$ cd <path to repo>
$ python -m nbviewer --debug --no-cache

This will automatically relaunch the server if a change is detected on a python file, and not cache any results. You can then just do the modifications you like to the source code and/or the templates then refresh the pages.

Contributing

If you would like to contribute to the project, please read the CONTRIBUTING.md. The CONTRIBUTING.md file explains how to set up a development installation and how to run the test suite.

Extending the Notebook Viewer

Providers

Providers are sources of notebooks and directories of notebooks and directories.

nbviewer ships with several providers

  • url
  • gist
  • github
  • local
Writing a new Provider

There are already several providers proposed/requested. Some providers are more involved than others, and some, such as those which would require user authentication, will take some work to support properly.

A provider is implemented as a python module, which can expose a few functions:

uri_rewrites

If you just need to rewrite URLs (or URIs) of another site/namespace, implement uri_rewrites, which will allow the front page to transform an arbitrary string (usually an URI fragment), escape it correctly, and turn it into a "canonical" nbviewer URL. See the dropbox provider for a simple example of rewriting URLs without using a custom API client.

default_handlers

If you need custom logic, such as connecting to an API, implement default_handlers. See the github provider for a complex example of providing multiple handlers.

Error Handling

While you could re-implement upstream HTTP error handling, a small convenience method is provided for intercepting HTTP errors. On a given URL handler that inherits from BaseHandler, overload the client_error_message and re-call it with your message (or None). See the gist provider for an example of customizing the error message.

Formats

Formats are ways to present notebooks to the user.

nbviewer ships with three providers:

  • html
  • slides
  • script
Writing a new Format

If you'd like to write a new format, open a ticket, or speak up on gitter! We have some work yet to do to support your next big thing in notebook publishing, and we'd love to hear from you.

Config File and Command Line Configuration

NBViewer is configurable using a config file, by default called nbviewer_config.py. You can modify the name and location of the config file that NBViewer looks for using the --config-file command line flag. (The location is always a relative path, i.e. relative to where the command python -m nbviewer is run, and never an absolute path.)

If you don't know which attributes of NBViewer you can configure using the config file, run python -m nbviewer --generate-config (or python -m nbviewer --generate-config --config-file="my_custom_name.py") to write a default config file which has all of the configurable options commented out and set to their default values. To change a configurable option to a new value, uncomment the corresponding line and change the default value to the new value.

You can also run python -m nbviewer --help-all to see all of the configurable options. This is a more comprehensive version of python -m nbviewer --help, which gives a list of the most common ones along with flags and aliases you can use to set their values temporarily via the command line.

The config file uses the standard configuration syntax for Jupyter projects. For example, to configure the default port used to be 9000, add the line c.NBViewer.port = 9000 to the config file. If you want to do this just once, you can also run python -m nbviewer --NBViewer.port=9000 at the command line. (NBViewer.port also has the alias port, making it also possible to do, in this specific case, python -m nbviewer --port=9000. However not all configurable options have shorthand aliases like this; you can check using the outputs of python -m nbviewer --help and python -m nbviewer --help-all to see which ones do and which ones don't.)

One thing this allows you to do, for example, is to write your custom implementations of any of the standard page rendering handlers included in NBViewer, e.g. by subclassing the original handlers to include custom logic along with custom output possibilities, and then have these custom handlers always loaded by default, by modifying the corresponding lines in the config file. This is effectively another way to extend NBViewer.

Securing the Notebook Viewer

You can run the viewer as a JupyterHub 0.7+ service. Running the viewer as a service prevents users who have not authenticated with the Hub from accessing the nbviewer instance. This setup can be useful for protecting access to local notebooks rendered with the --localfiles option.

Add an entry like the following to your jupyterhub_config.py to have it start nbviewer as a managed service:

python
c.JupyterHub.services = [
    {
        # the /services/<name> path for accessing the notebook viewer
        'name': 'nbviewer',
        # the interface and port nbviewer will use
        'url': '[***]
        # the path to nbviewer repo
        'cwd': '<path to repo>',
        # command to start the nbviewer
        'command': ['python', '-m', 'nbviewer']
    }
]

The nbviewer instance will automatically read the various JUPYTERHUB_* environment variables and configure itself accordingly. You can also run the nbviewer instance as an externally managed JupyterHub service, but must set the requisite environment variables yourself.

查看更多 nbviewer 相关镜像 →
islasgeci/jupyter logo
islasgeci/jupyter
islasgeci
Jupyter para Ciencia de Datos • GECI
6.8千+ 次下载
5 年前更新
opendatacube/jupyter logo
opendatacube/jupyter
opendatacube
An image with OpenDataCube and Jupyter
1 次收藏1.8千+ 次下载
6 年前更新
datajoint/jupyter logo
datajoint/jupyter
datajoint
**Deprecated**: Official DataJoint Jupyter notebook Docker image.
756 次下载
6 年前更新
jupyter/scipy-notebook logo
jupyter/scipy-notebook
jupyter
来自https://github.com/jupyter/docker-stacks的科学Jupyter Notebook Python栈
472 次收藏5000万+ 次下载
2 年前更新
jupyter/all-spark-notebook logo
jupyter/all-spark-notebook
jupyter
包含Python、Scala、R和Spark的Jupyter Notebook栈,来自https://github.com/jupyter/docker-stacks项目
438 次收藏5000万+ 次下载
2 年前更新
jupyter/pyspark-notebook logo
jupyter/pyspark-notebook
jupyter
来自https://github.com/jupyter/docker-stacks的Python与Spark Jupyter Notebook栈
321 次收藏5000万+ 次下载
2 年前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
jupyter/nbviewer
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.