生成和启动Jupyter笔记本的Web服务
项目描述
# experiment-launcher
[](https://travis-ci.org/eWaterCycle/experiment-launcher) [](https://sonarcloud.io/dashboard?id=experiment-launcher) [](https://sonarcloud.io/component_measures?id=experiment-launcher&metric=coverage) [](https://doi.org/10.5281/zenodo.1453264)
水循环实验启动器是一个Web服务,用于生成和启动Jupyter笔记本。
该Web服务的API在[openapi.yaml](https://github.com/eWaterCycle/experiment-launcher/blob/master/ewatercycle_experiment_launcher/swagger.yaml)的OpenAPI规范中进行描述,并可以在[Swagger UI](http://petstore.swagger.io/?url=https://raw.githubusercontent.com/eWaterCycle/experiment-launcher/master/ewatercycle_experiment_launcher/openapi.yaml)中查看。
# 安装
## JupyterHub服务器
实验启动器需要与Jupyter Hub服务器进行通信。JupyterHub服务器必须运行具有已知令牌且具有管理员权限的服务。
`bash pip install jupyterhub dockerspawner sudo npm install -g configurable-http-proxy cp jupyterhub_config.py.example jupyterhub_config.py # 生成令牌 export JUPYTERHUB_TOKEN=$(openssl rand -hex 32) echo $JUPYTERHUB_TOKEN # 设置令牌 nano jupyterhub_config.py docker pull ewatercycle/jupyterlab-experiment-builder jupyterhub `
通过访问http://172.17.0.1:8000并使用操作系统凭证登录来测试JupyterHub。
## 生成环境安装
`bash pip install ewatercycle_experiment_launcher `
## 开发环境安装
要将启动器安装到开发模式,请克隆存储库并运行
`bash python setup.py develop `
# 运行
`bash # JUPYTERHUB_TOKEN环境变量应设置为jupyterhub_config.py中令牌的相同值 export JUPYTERHUB_URL=http://172.17.0.1:8000 gunicorn -w 4 -b 0.0.0.0:8888 ewatercycle_experiment_launcher.serve:app `
前往http://localhost:8888/ui/以访问Swagger UI。
JupyterHub和实验启动器使用本地操作系统账户进行身份验证和授权。
在Swagger UI中,您必须先授权才能尝试操作。
当在互联网上运行时,请确保强制执行https,以确保身份验证安全。
# 更新日志 此项目中所有显著更改都将记录在此文件中。
格式基于[Keep a Changelog](http://keepachangelog.com/en/1.0.0/),并且此项目遵循[语义版本控制](http://semver.org/spec/v2.0.0.html)。
## [未发布]
## [0.2.0] - 2018-12-06
### 修复
工作区已在另一个JupyterLab窗口中使用 (#11)
### 更改
升级到Connexion v2
升级到OpenAPI v3
## [0.1.0] - 2018-10-09
初始版本
项目详情
哈希值 用于 ewatercycle_experiment_launcher-0.2.0-py2.py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5b1693d9ba614e8d9456f3c4335a8414e02c7703077dbf21c4126a84bad254de |
|
MD5 | c61aa2be55985e9d96693b9a871081a6 |
|
BLAKE2b-256 | 17fecc803936a7b8d6968525579e27e4e3ef54894d35f61b1d92ad73ba42ed40 |