Skip to content

Commit

Permalink
Merge pull request sony#13 from nnabla/s-takuseno/update_readme
Browse files Browse the repository at this point in the history
Update readme for the initial release
  • Loading branch information
AkioHayakawa-sony authored Apr 12, 2022
2 parents 1250b02 + 9b2fda9 commit 41dd97e
Showing 1 changed file with 39 additions and 40 deletions.
79 changes: 39 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,87 @@
# nnabla Browser
# nnabla-browser

[![test](https://github.com/nnabla/nnabla-browser/actions/workflows/test.yaml/badge.svg)](https://github.com/nnabla/nnabla-browser/actions/workflows/test.yaml)
[![test](https://github.com/sony/nnabla-browser/actions/workflows/test.yaml/badge.svg)](https://github.com/sony/nnabla-browser/actions/workflows/test.yaml)

nnabla browser is a browser based visualizer for [Neural Network Libraries](https://github.com/sony/nnabla).
nnabla-browser is a browser-based visualizer for [Neural Network Libraries](https://github.com/sony/nnabla).

![](imgs/overview.gif)

## For users

### Environment
### Requirements

python >= 3.6

### Install

- Pip install from pypi

```shell
$pip install nnabla-browser
```

- Build from source to create wheel & install

Using npm installed in your environment, you can create wheel as follows.
```shell
$ make nnabla-browser-wheel # npm is required
$ pip install ./dist/nnablabrowser-<version>-<env>.whl
```

We also provide docker image so that you don't have to set up environment on your server:
```shell
$ make bwd-nnabla-browser-wheel # `bwd` stands for build with docker
$ pip install ./dist/nnablabrowser-<version>-<env>.whl
```
Note that .whl file is created in ./dist for default setting.
```shell
$ pip install nnabla-browser
```

### Run server

Once you have installed nnabla-browser in your environment, you can launch server from anywhere as long as you use same python environment.

``` shell
$nnabla-browser --logdir /path/to/logdir --port PORT
$ nnabla-browser --logdir /path/to/logdir --port PORT
```

For macOS users, you have to set an environment variable to allow NNabla Browser to use multi-process as follows:
For macOS users, you might have to set an environment variable to allow NNabla Browser to use multi-process as follows:
``` shell
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```

### Access server

Launch any browser application and just access to \<server-address\>:PORT/
For example, when you launch server on the same computer which browser can be used, you can access localhost:8888/
Launch any browser application and just access to `<server-address>:PORT/`
For example, when you launch server on the same computer which browser can be used, you can access `localhost:8888/`

## contributions
## For developers

### Requirements

- pipenv
- npm

### Bundle js packages
### Install dependencies
```shell
# install node dependency
$ npm install
# install javascript dependencies
$ npm install

# bundle packages
$ npm run build
# install python dependencies (`--pre` is required to install black.)
$ pipenv install --pre
```

### Run server for development
### Build frontend

```shell
# install python dependency (`--pre` is required to install black.)
$ pipenv install --pre
$ npm run build
```

### Run development server

```shell
# launch python server
$ pipenv run dev

# launch frontend server with hot-reloading
$ npm run serve
```

Then, access to `localhost:8000` from your browser.

### Build whl package

Using npm installed in your environment, you can create wheel as follows.
```shell
$ make nnabla-browser-wheel # npm is required
$ pip install ./dist/nnablabrowser-<version>-<env>.whl
```

We also provide docker image so that you don't have to set up environment on your server:
```shell
$ make bwd-nnabla-browser-wheel # `bwd` stands for build with docker
$ pip install ./dist/nnablabrowser-<version>-<env>.whl
```

After that, access to `localhost:8000` from your browser.
Note that .whl file is created in ./dist for default setting.

0 comments on commit 41dd97e

Please sign in to comment.