From a5f76a3a3adc929221ae7f4e73da1d73cfa6d04d Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Thu, 14 Dec 2017 16:30:20 +0800 Subject: [PATCH] update document (#50) --- README.md | 29 ++++++++++++++++++++--------- server/visualdl/visual_dl.py | 1 + 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 990bf98e..3d055bf2 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,32 @@ ### How to use -#### Step 1: build and install Python package +#### Step 1: build frontend ```shell -python setup.py bdist_wheel -cd dist -pip install visualdl-0.0.1-py2-none-any.whl +cd frontend +npm install +npm run build ``` -#### Step 2: build frontend +this step will generate a dist directory under frontend + +### Step 2: copy frontend/dist to server/visualdl/frontend/dist ```shell -cd visualdl/frontend -npm install -npm run build +cp -r frontend/dist server/visualdl/frontend/ ``` +#### Step 3: build and install Python package +```shell +cd server/visualdl +python setup.py bdist_wheel +cd dist +pip install --upgrade visualdl-0.0.1-py2-none-any.whl +``` + + ### Step 3: run ``` -python bin/visual_dl.py --port=8888 +# cd to visualdl install dir +cd /usr/local/lib/python2.7/site-packages/visualdl/ +python visual_dl.py --port=8888 ``` diff --git a/server/visualdl/visual_dl.py b/server/visualdl/visual_dl.py index ec440a4e..79113ada 100644 --- a/server/visualdl/visual_dl.py +++ b/server/visualdl/visual_dl.py @@ -27,6 +27,7 @@ def option_parser(): parser.add_option( "-p", "--port", + type=int, default=8040, action="store", dest="port", -- GitLab