跳转到主要内容

用于JupyterLab Heroku扩展的服务器扩展

项目描述

jupyterlab-heroku

npm pypi

JupyterLab扩展,用于管理和部署应用程序到Heroku。

此扩展可实现一键部署voila仪表板。

screencast

要求

创建Heroku账户

如果您已有Heroku账户,可以跳到下一节.

您可以通过以下说明创建新的Heroku账户: https://signup.heroku.com/

安装heroku客户端

您需要在您的计算机上安装heroku客户端才能部署应用程序。要设置它: https://devcenter.heroku.com/articles/getting-started-with-python#set-up

设置完成后,使用以下命令测试安装:

$ heroku --version
heroku/7.26.2 linux-x64 node-v11.14.0

登录Heroku

登录Heroku有多种方式

  1. heroku login将打开新的浏览器标签,使用电子邮件和密码登录
  2. 创建一个~/.netrc文件,包含API令牌(有关更多详细信息,请参阅文档
  3. 设置环境变量HEROKU_API_KEY

为了测试认证:heroku apps

其他依赖项

此扩展还需要

  • JupyterLab 1.0
  • git

安装

pip install jupyterlab-heroku
jupyter serverextension enable --sys-prefix --py jupyterlab_heroku
jupyter labextension install jupyterlab-heroku

由于Heroku使用git来部署应用程序,因此还建议安装JupyterLab的jupyterlab-git扩展

pip install jupyterlab-git
jupyter serverextension enable --sys-prefix --py jupyterlab_git
jupyter labextension install @jupyterlab/git

贡献

安装

# Clone the repo to your local environment
# Move to jupyterlab-heroku directory

# Create a new conda environment
conda create -n jupyterlab-heroku -c conda-forge jupyterlab nodejs

# Install the server extension
python -m pip install -e .
jupyter serverextension enable --sys-prefix --py jupyterlab_heroku

# Install dependencies
jlpm

# Build Typescript source
jlpm build

# Link your development version of the extension with JupyterLab
jupyter labextension link .

# Rebuild Typescript source after making changes
jlpm build

# Rebuild JupyterLab after making any changes
jupyter lab build

您可以通过监视源目录并以监视模式运行JupyterLab来监视扩展源中的更改,并自动重新构建扩展和应用。

# Watch the source directory in another terminal tab
jlpm watch

# Run jupyterlab in watch mode in one terminal tab
jupyter lab --watch

卸载

jupyter labextension uninstall jupyterlab-heroku

替代方案

要使用命令行将Voila应用程序部署到Heroku: https://github.com/martinRenou/voila_heroku

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

jupyterlab_heroku-0.2.1.tar.gz (4.8 kB 查看散列值)

上传时间 源代码

构建分发

jupyterlab_heroku-0.2.1-py3-none-any.whl (6.2 kB 查看散列值)

上传时间 Python 3

支持者

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误日志 StatusPageStatusPage 状态页面