Illegal Instruction when running ./predict
tuancorn97 opened this issue · comments
Hi there,
I have just downloaded your models and installed all the requirement, but it did not work when I tried predicting the images with
./predict \ --docker-image nima-cpu \ --base-model-name MobileNet \ --weights-file $(pwd)/models/MobileNet/weights_mobilenet_technical_0.11.hdf5 \ --image-source $(pwd)/src/tests/test_images/42039.jpg
It then showed an error of Illegal Instruction in the file entrypoint.predict.cpu.sh:
entrypoints/entrypoint.predict.cpu.sh: line 12: 6 Illegal instruction (core dumped) python -m evaluater.predict --base-model-name $BASE_MODEL_NAME --weights-file $WEIGHTS_FILE --image-source $IMAGE_SOURCE
Hm, not sure what is happening there. We upgraded to TF2.0 today, can you try again with the newest version and see if it works?
Hello. Same problem. With newest version also.
Which operating system and Docker version are you running?
Probably the reason is cpu. (Intel Xeon X5675) tensorflow/serving#1342
I solve it building tensorflow binary without avx instruction. There are compiled WHL for different processors - https://github.com/yaroslavvb/tensorflow-community-wheels/issues
Then add in dockerfile
COPY tensorflow-2.0.0-cp36-cp36m-linux_x86_64.whl /tensorflow-2.0.0-cp36-cp36m-linux_x86_64.whl
RUN pip uninstall tensorflow -y \
&& pip install tensorflow-2.0.0-cp36-cp36m-linux_x86_64.whl \
&& rm -rf /tensorflow-2.0.0-cp36-cp36m-linux_x86_64.whl