fix tensorflow INSTALL.sh order of operations
parent
4f3003d754
commit
103c543a0e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue