start_dev_server.sh 557 字节
Newer Older
1 2 3
#!/bin/bash
set -ex

4 5
CURRENT_DIR=`pwd`

6 7 8
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $SCRIPT_DIR/../frontend
9 10
export PYTHONPATH=$PYTHONPATH:"$SCRIPT_DIR/.."

D
daminglu 已提交
11 12 13 14
rm -rf ./dist
mkdir dist
npm run build

15
./node_modules/.bin/webpack --watch --config tool/webpack.dev.config.js --output-path=../visualdl/server/dist &
16 17 18 19 20 21
# Track webpack pid
WEBPACKPID=$!

function finish {
    kill -9 $WEBPACKPID
}
22

23
trap finish EXIT HUP INT QUIT PIPE TERM
24

25
cd $CURRENT_DIR
26 27

#Run the visualDL with local PATH
28
python ${SCRIPT_DIR}/../visualdl/server/visualDL "$@"