diff --git a/README.md b/README.md index 990bf98e0f373bf0bcf0f237611cf5d7347cb65b..3d055bf2b623a3ff31543e85df7b6471edd792a3 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 ec440a4e2a10ebeef59a4c613be6a2678fe20411..79113ada517a9f5b6be7182fa8d2310c96b42d64 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",