-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from rapidsai/branch-0.6
Release 0.6.0
- Loading branch information
Showing
33 changed files
with
3,943 additions
and
983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
dist | ||
coverage | ||
**/*.d.ts | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module' | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': [ | ||
'error', | ||
{ prefixWithI: 'always' } | ||
], | ||
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/quotes': [ | ||
'error', | ||
'single', | ||
{ avoidEscape: true, allowTemplateLiterals: false } | ||
], | ||
curly: ['error', 'all'], | ||
eqeqeq: 'error', | ||
'prefer-arrow-callback': 'error' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
**/node_modules | ||
**/lib | ||
**/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2020, NVDashboard Contributors All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
recursive-include jupyterlab_nvdashboard *.py | ||
|
||
include setup.py | ||
include LICENSE | ||
include README.md | ||
include LICENSE.txt | ||
include requirements.txt | ||
include MANIFEST.in | ||
include pyproject.toml | ||
include jupyter-config/jupyterlab_nvdashboard.json | ||
|
||
include package.json | ||
include install.json | ||
include ts*.json | ||
include requirements.txt | ||
|
||
graft jupyterlab_nvdashboard/labextension | ||
|
||
# Javascript files | ||
graft src | ||
graft style | ||
prune **/node_modules | ||
prune lib | ||
|
||
recursive-exclude * __pycache__ | ||
# Patterns to exclude from any directory | ||
global-exclude *~ | ||
global-exclude *.pyc | ||
global-exclude *.pyo | ||
global-exclude .git | ||
global-exclude .ipynb_checkpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,85 @@ | ||
JupyterLab GPU Dashboards | ||
=========================== | ||
# jupyterlab_nvdashboard | ||
|
||
[![PyPI](https://img.shields.io/pypi/v/jupyterlab-nvdashboard)](https://pypi.org/project/jupyterlab-nvdashboard/) | ||
[![npm](https://img.shields.io/npm/v/jupyterlab-nvdashboard)](https://www.npmjs.com/package/jupyterlab-nvdashboard) | ||
![Github Actions Status](https://github.com/rapidsai/jupyterlab-nvdashboard/workflows/Build/badge.svg) | ||
|
||
A JupyterLab extension for displaying GPU usage dashboards | ||
|
||
A JupyterLab extension for displaying dashboards of GPU usage. | ||
|
||
![demo](./demo.gif) | ||
This extension is composed of a Python package named `jupyterlab_nvdashboard` | ||
for the server extension and a NPM package named `jupyterlab-nvdashboard` | ||
for the frontend extension. | ||
|
||
Built with [JupyterLab and Bokeh Server](https://github.com/ian-r-rose/jupyterlab-bokeh-server) | ||
|
||
## Requirements | ||
|
||
What's here | ||
----------- | ||
* JupyterLab >= 3.0 | ||
|
||
This repository contains two sets of code: | ||
## Install | ||
|
||
- Python code defining a Bokeh Server application that generates the dashboards | ||
in the `jupyterlab_nvdashboard/` directory | ||
- TypeScript code integrating these dashboards into JupyterLab in the `src/` | ||
directory | ||
|
||
You should be able to modify only the Python code to edit the dashboards | ||
without modifying the TypeScript code. | ||
|
||
## Prerequisites | ||
|
||
* JupyterLab 1.0 | ||
* bokeh | ||
* pynvml | ||
|
||
## Installation | ||
```bash | ||
pip install jupyterlab_nvdashboard | ||
``` | ||
|
||
This extension has a server-side (Python) and a client-side (Typescript) component, | ||
and we must install both in order for it to work. | ||
|
||
> **Note: Currently nvdashboard does not support Windows** | ||
## Troubleshoot | ||
|
||
To install the server-side component, run the following in your terminal | ||
If you are seeing the frontend extension, but it is not working, check | ||
that the server extension is enabled: | ||
|
||
```bash | ||
pip install jupyterlab-nvdashboard | ||
jupyter server extension list | ||
``` | ||
|
||
To install the client-side component, run | ||
If the server extension is installed and enabled, but you are not seeing | ||
the frontend extension, check the frontend extension is installed: | ||
|
||
```bash | ||
jupyter labextension install jupyterlab-nvdashboard | ||
jupyter labextension list | ||
``` | ||
|
||
## Development | ||
|
||
To install the server-side part, run the following in your terminal from the repository directory: | ||
## Contributing | ||
|
||
### Development install | ||
|
||
Note: You will need NodeJS to build the extension package. | ||
|
||
The `jlpm` command is JupyterLab's pinned version of | ||
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use | ||
`yarn` or `npm` in lieu of `jlpm` below. | ||
|
||
```bash | ||
# Clone the repo to your local environment | ||
# Change directory to the jupyterlab_nvdashboard directory | ||
# Install package in development mode | ||
pip install -e . | ||
# Link your development version of the extension with JupyterLab | ||
jupyter labextension develop . --overwrite | ||
# Rebuild extension Typescript source after making changes | ||
jlpm run build | ||
``` | ||
|
||
In order to install the client-side component (requires node version 8 or later), run the following in the repository directory: | ||
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension. | ||
|
||
```bash | ||
jlpm install | ||
jlpm run build | ||
jupyter labextension install . | ||
# Watch the source directory in one terminal, automatically rebuilding when needed | ||
jlpm run watch | ||
# Run JupyterLab in another terminal | ||
jupyter lab | ||
``` | ||
|
||
To rebuild the package and the JupyterLab app: | ||
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt). | ||
|
||
By default, the `jlpm run build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command: | ||
|
||
```bash | ||
jlpm run build | ||
jupyter lab build | ||
jupyter lab build --minimize=False | ||
``` | ||
|
||
## Publishing | ||
|
||
This application is distributed as two subpackages. | ||
### Uninstall | ||
|
||
The JupyterLab frontend part is published to [npm](https://www.npmjs.com/package/jupyterlab-nvdashboard), | ||
and the server-side part to both [PyPI](https://pypi.org/project/jupyterlab-nvdashboard/) and [Anaconda](https://anaconda.org/rapidsai/jupyterlab-nvdashboard) ([nightlies](https://anaconda.org/rapidsai-nightly/jupyterlab-nvdashboard)). | ||
```bash | ||
pip uninstall jupyterlab_nvdashboard | ||
``` | ||
|
||
Releases for both packages are handled by [gpuCI](https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/jupyterlab-nvdashboard/). Nightly builds are triggered when a push to a versioned branch occurs (i.e. `branch-0.5`). Stable builds are triggered when a push to the `main` branch occurs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.