diff --git a/scripts/setup_dev_env.sh b/scripts/setup_dev_env.sh index 3e2e2cfd3..4d59bf4c1 100755 --- a/scripts/setup_dev_env.sh +++ b/scripts/setup_dev_env.sh @@ -21,4 +21,4 @@ cd build cmake .. make -j $processors -export PYTHON_PATH=$PYTHON_PATH:"$SCRIPT_DIR/.." +export PYTHONPATH=$PYTHONPATH:"$SCRIPT_DIR/.." diff --git a/scripts/start_dev_server.sh b/scripts/start_dev_server.sh index 1a5dcb119..a0951cc47 100755 --- a/scripts/start_dev_server.sh +++ b/scripts/start_dev_server.sh @@ -6,9 +6,19 @@ CURRENT_DIR=`pwd` SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $SCRIPT_DIR/../frontend +export PYTHONPATH=$PYTHONPATH:"$SCRIPT_DIR/.." + ./node_modules/.bin/webpack --watch --config tool/webpack.dev.config.js --output-path=../visualdl/server/dist & +# Track webpack pid +WEBPACKPID=$! + +function finish { + kill -9 $WEBPACKPID +} -export PYTHON_PATH=$PYTHON_PATH:"$SCRIPT_DIR/.." +trap finish EXIT HUP INT QUIT PIPE TERM cd $CURRENT_DIR + +#Run the visualDL with local PATH python ${SCRIPT_DIR}/../visualdl/server/visualDL "$@"