fix tensorflow INSTALL.sh order of operations

pushover
Moe 2020-01-23 14:14:23 -08:00
parent 4f3003d754
commit 103c543a0e
1 changed files with 7 additions and 4 deletions

View File

@ -6,13 +6,9 @@ echo "Getting Tensorflow Node.js module..."
if [ "$nodejsinstall" = "y" ] || [ "$nodejsinstall" = "Y" ]; then
npm uninstall @tensorflow/tfjs-node-gpu --unsafe-perm
npm install @tensorflow/tfjs-node-gpu --unsafe-perm
sed -i 's/"tfjsBuild":"cpu"/"tfjsBuild":"gpu"/g' conf.json
sed -i 's/"tfjsBuild":"gpuORcpu"/"tfjsBuild":"gpu"/g' conf.json
else
npm uninstall @tensorflow/tfjs-node --unsafe-perm
npm install @tensorflow/tfjs-node --unsafe-perm
sed -i 's/"tfjsBuild":"gpu"/"tfjsBuild":"cpu"/g' conf.json
sed -i 's/"tfjsBuild":"gpuORcpu"/"tfjsBuild":"cpu"/g' conf.json
fi
echo "Getting Coco SSD Model..."
npm install @tensorflow-models/coco-ssd --unsafe-perm
@ -23,3 +19,10 @@ if [ ! -e "./conf.json" ]; then
else
echo "conf.json already exists..."
fi
if [ "$nodejsinstall" = "y" ] || [ "$nodejsinstall" = "Y" ]; then
sed -i 's/"tfjsBuild":"cpu"/"tfjsBuild":"gpu"/g' conf.json
sed -i 's/"tfjsBuild":"gpuORcpu"/"tfjsBuild":"gpu"/g' conf.json
else
sed -i 's/"tfjsBuild":"gpu"/"tfjsBuild":"cpu"/g' conf.json
sed -i 's/"tfjsBuild":"gpuORcpu"/"tfjsBuild":"cpu"/g' conf.json
fi