GithubHelp home page GithubHelp logo

jupyter / dashboards_setup Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 23.0 3.5 MB

[RETIRED] Recipes for setting up components related to the incubating dashboards effort

License: Other

Makefile 37.31% Python 7.51% Jupyter Notebook 50.09% HTML 5.09%

dashboards_setup's Introduction

Jupyter

Read this in other languages: English, Español, Português, Français

Jupyter metapackage for installation and documents

Documentation structure

This documentation uses the Sphinx documentation engine.

The documentation is located in the docs/source folder. When you build the documentation, it will be placed in the docs/build folder. It is written in a combination of reStructuredText and MyST Markdown.

Build the documentation locally

There are a few ways to build the documentation; see below for instructions:

Build the documentation automatically with nox

The easiest way to build the documentation locally is by using the nox command line tool. This tool makes it easy to automate commands in a repository, and we have included a docs command to quickly install the dependencies and build the documentation.

To build and preview the site locally, follow these steps:

  1. Clone this repository.

    $ git clone https://github.com/jupyter/jupyter
    $ cd jupyter
  2. Install nox

    $ pip install nox
  3. Run the docs command

    $ nox -s docs

This will install the needed dependencies in a virtual environment using pip. It will then place the documentation in the docs/build/html folder. You may explore these HTML files in order to preview the site.

Create a live server to automatically preview changes

There is another nox command that will do the above, and also create a live server that watches your source files for changes, and auto-builds the website any time a change is made.

To start this live server, use the following nox command:

$ nox -s docs-live

When the build is finished, go to the URL that is displayed. It should show a live preview of your documentation.

To stop serving the website, press Ctrl-C in your terminal

Build the documentation manually

To build the documentation manually, follow these steps:

First, install the miniconda Python distribution.

Next, navigate to the /docs directory and create a conda environment:

conda env create -f environment.yml

Activate the environment:

source activate jupyter_docs

Build the docs using Sphinx with the following commands:

make clean
make html

The docs will be built in build/html. They can be viewed by opening build/html/index.html or starting an HTTP server and navigating to 0.0.0.0:8000 in your web browser.

python3 -m http.server

Releasing the jupyter metapackage

Anyone with push access to this repo can make a release of the Jupyter metapackage (this happens very rarely). We use tbump to publish releases.

tbump updates version numbers and publishes the git tag of the version. Our GitHub Actions then build the releases and publish them to PyPI.

The steps involved:

  1. Install tbump: pip install tbump
  2. Tag and publish the release tbump $NEW_VERSION.

That's it!

dashboards_setup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboards_setup's Issues

Cloud Foundry setup not working

Hi,
I'm trying to get the Cloud Foundry setup working. I can upload a notebook/dashboard to the server, and I can communicate directly with the kernel gateway. However, there is a problem when trying to view a dashboard. When trying to open INTRO, I get an error (500 internal server error, but if I follow the failed resource I get this:)

Error 404
Error getting notebook info: /home/vcap/node_modules/jupyter-dashboards-server/data/api/kernels - ENOENT: no such file or directory, stat

The failure happens in line 194 in the dashboards-server api routes file:
https://github.com/jupyter-attic/dashboards_server/blob/master/routes/api.js

I think the RegEx on line 182 is to blame. Anyone having the same issue?

How are environment variables in db_secrets.sh used?

I checked docker_deploy and it seems to me that environment variables are not used in any other places. Sorry that I'm new to docker-compose and Jupyter dashboards. An explanation on how environment variables are used is greatly appreciated!

stderr Widget Javascript not detected. How to register it?

  1. Clear out shared/jupyter and etc/jupyter folders
  2. Install and register modules and extensions:
pip install jupyter-kernel-gateway==0.5.1
pip install ipython==4.2.0
pip install jupyter-client==4.2.2
pip install jupyter-cms==0.5.0
pip install jupyter-core==4.1.0
pip install jupyter-dashboards==0.6.0
pip install jupyter-dashboards-bundlers==0.8.0
pip install jupyter-declarativewidgets==0.6.2
pip install ipywidgets==5.1.5

jupyter cms quick-setup --sys-prefix
jupyter dashboards quick-setup --sys-prefix
jupyter declarativewidgets quick-setup --sys-prefix
jupyter dashboards_bundlers quick-setup --sys-prefix
jupyter nbextension enable --py --sys-prefix widgetsnbextension
  1. Verify the install:
jupyter nbextension list

Known nbextensions:
  config dir: foobar\etc\jupyter\nbconfig
    notebook section
      declarativewidgets/js/main enabled
      - Validating: ok
      jupyter-js-widgets/extension enabled
      - Validating: ok
      jupyter_cms/notebook/main enabled
      - Validating: ok
      jupyter_dashboards/notebook/main enabled
      - Validating: ok
    tree section
      jupyter_cms/dashboard/main enabled
      - Validating: ok
    edit section
      jupyter_cms/editor/main enabled
      - Validating: ok
  1. Publish a dummy notebook to dashboards server
  2. Open that dashboard.
    In the console you inevitably find
dashboard.js:1 stderr Widget Javascript not detected.  It may not be installed properly. Did you enable the widgetsnbextension? If not, then run "jupyter nbextension enable --py --sys-prefix widgetsnbextension"
stream @ dashboard.js:1a @ dashboard.js:1(anonymous function) @ dashboard.js:1i.onIOPub @ dashboard.js:66e._handleIOPub @ dashboard.js:27e.handleMsg @ dashboard.js:27t._onWSMessage @ dashboard.js:27_ws.onmessage @ dashboard.js:27
Failed to parse SourceMap: http://server:3000/components/dashboard.js.map

Declarative Widgets not supported ("urth_components" directory not found)

Widget frontend version does not match the backend.

That command was run successfully above, no?

Upgrade to IPYWIDGETS_VER: '6.0.*' not working?

I want to use widgets.DatePicker widget in my jupyter notebook which is available in IPYWIDGETS_VER 6.0 onwards.

For that, I added following lines to the end of Dockerfile.notebook

RUN pip install --upgrade --ignore-installed setuptools
RUN pip install "ipywidgets==6.0.*"

After adding these lines, docker-compose build && docker-compose up seem to be working fine.

However, when I start a new notebook and run

import ipywidgets
ipywidgets.__version__

I get 5.1.5. I am kind of lost here, since if instead of starting a notebook, I start a new terminal and write the same commands, I see version "6.0.0".

EDIT
I am using docker_deploy setup

webgl globe no longer working in meetup streaming notebook for docker_deploy

After cloning and running,

docker-compose build
docker-compose up

..running the WebGL globe cell in the meetup-streaming.ipynb gives the following error (and the globe cell output is empty):

notebook_1        | [I 18:58:58.565 NotebookApp] Installing 'PolymerElements/paper-card'
notebook_1        | bower                        ECONFLICT Unable to find suitable version for polymer
notebook_1        | [E 18:59:00.571 NotebookApp] Failed installing 'PolymerElements/paper-card' into '/opt/conda/share/jupyter/nbextensions/declarativewidgets' with cmd:
notebook_1        | ['bower', 'install', 'PolymerElements/paper-card', '--allow-root', '--config.interactive=false', '--production', '--quiet']
notebook_1        | due to: Command '['bower', 'install', 'PolymerElements/paper-card', '--allow-root', '--config.interactive=false', '--production', '--quiet']' returned non-zero exit status 1

The other widgets are working.

Question: Install all in Docker?

Hi, all
It's a stupid question maybe, but I hope someone can do me a favor.
I just want to publish a interactive map with Folium in Jupyter notebook to dashboards server. Should I install Jupyter Notebook, Dashboards, Bundler, Server in a Docker in my remote server?
Thanks!

Yafei

make dev-image

I cannot get past this error when trying to make dev-image: I don't even know where to start debugging on this one. Could you please help?

C02PW287G8WP:~ andreacortis$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.11.6 (15G1421)
      Kernel Version: Darwin 15.6.0
      [...]
docker --version
Docker version 1.12.1, build 6f9534c
(py35) C02PW287G8WP:tmpnb_deploy andreacortis$ make dev-image
Sending build context to Docker daemon 3.658 MB
Step 1 : FROM jupyter/all-spark-notebook:2d878db5cbff
 ---> dc7116e0b606
Step 2 : USER root
 ---> Using cache
 ---> 2ff2f7bdfcec
Step 3 : RUN apt-get update &&         apt-get install curl &&         curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - &&         apt-get install --yes nodejs npm &&         npm install -g bower &&         ln -s /usr/bin/nodejs /usr/bin/node
 ---> Running in 3450c8cf1ab4
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [145 kB]
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [464 kB]
Get:4 http://httpredir.debian.org jessie Release.gpg [2,373 B]
Get:5 http://httpredir.debian.org jessie Release [148 kB]
Get:6 http://repos.mesosphere.io wheezy InRelease [3,137 B]
Get:7 http://httpredir.debian.org jessie-updates/main amd64 Packages [17.6 kB]
Get:8 http://httpredir.debian.org jessie/main amd64 Packages [9,049 kB]
Get:9 http://repos.mesosphere.io wheezy/main amd64 Packages [3,641 B]
Fetched 9,896 kB in 2min 7s (77.5 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libcurl3
The following NEW packages will be installed:
  curl
The following packages will be upgraded:
  libcurl3
1 upgraded, 1 newly installed, 0 to remove and 109 not upgraded.
Need to get 460 kB of archives.
After this operation, 333 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
The command '/bin/sh -c apt-get update &&         apt-get install curl &&         curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - &&         apt-get install --yes nodejs npm &&         npm install -g bower &&         ln -s /usr/bin/nodejs /usr/bin/node' returned a non-zero code: 1
make: *** [dev-image] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.