forked from sony/nnabla-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
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 sony#13 from nnabla/s-takuseno/update_readme
Update readme for the initial release
- Loading branch information
Showing
1 changed file
with
39 additions
and
40 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 |
---|---|---|
@@ -1,88 +1,87 @@ | ||
# nnabla Browser | ||
# nnabla-browser | ||
|
||
[](https://github.com/nnabla/nnabla-browser/actions/workflows/test.yaml) | ||
[](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). | ||
|
||
 | ||
|
||
## 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. |