Skip to content

Commit

Permalink
[deploy.sh] fix node-gyp failure on rebuild
Browse files Browse the repository at this point in the history
node-gyp configure will fail if build directory already exists.

One reason this might already exists is if new models have been added
to the model path, and `npm run deploy --- -m local` is run again.

This change enables building a generic docker image for gzweb, and later
loading in the models at launch time via a volume mount that were not
known when the original gzweb image was built.
  • Loading branch information
moriarty committed Sep 10, 2020
1 parent fcd826d commit 03fe718
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ fi
make -j 8

cd ../gzbridge
if [ -d "./build" ]; then
# node-gym configure will fail if build already exists
rm -rf ./build
fi
$DIR/node_modules/.bin/node-gyp configure
$DIR/node_modules/.bin/node-gyp build -d

Expand Down

0 comments on commit 03fe718

Please sign in to comment.