OpenNMT / nmt-wizard-docker

Dockerized NMT frameworks for nmt-wizard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

Ashwinshankar98 opened this issue · comments

I tried running nmtwizard/opennmt-tf docker image on my laptop but ended up with the following error:

The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

pc specs:
OS: Windows 10 home 64-bit
Processor: Intel(R) Pentium(R) CPU N4200 @1.10GHz(4cpus),~1.1Ghz
Memory: 4096 RAM

command: sudo docker run -p 5000:5000 -v $PWD:/root/models nmtwizard/opennmt-tf --model averaged-ende-export500k --model_storage /root/models serve --host 0.0.0.0 --port 5000

error: The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine.

expected output:
2019-06-13 12:33:35Z.000021 [beat_service] WARNING start_beat_service: CALLBACK_URL or task_id is unset; beat service will be disabled
2019-06-13 12:33:35Z.000022 [utility] INFO run: Starting executing utility NMT framework=?
2019-06-13 12:33:35Z.000022 [storage] INFO get: Synchronizing /root/models/averaged-ende-export500k to /root/models/averaged-ende-export500k
2019-06-13 12:33:35Z.000023 [utility] INFO check_model_dir: Checking integrity of model package /root/models/averaged-ende-export500k
2019-06-13 12:33:35Z.000554 [serving] INFO start_server: Serving model on port 5000
2019-06-13 12:33:37.612198: I tensorflow_serving/model_servers/server.cc:82] Building single TensorFlow model file config: model_name: enhi model_base_path: /root/models/averaged-ende-export500k
2019-06-13 12:33:37.656124: I tensorflow_serving/model_servers/server_core.cc:461] Adding/updating models.
2019-06-13 12:33:37.656209: I tensorflow_serving/model_servers/server_core.cc:558] (Re-)adding model: enhi
2019-06-13 12:33:37.770131: I tensorflow_serving/core/basic_manager.cc:739] Successfully reserved resources to load servable {name: enhi version: 1}
2019-06-13 12:33:37.770219: I tensorflow_serving/core/loader_harness.cc:66] Approving load for servable version {name: enhi version: 1}
2019-06-13 12:33:37.770253: I tensorflow_serving/core/loader_harness.cc:74] Loading servable version {name: enhi version: 1}
2019-06-13 12:33:37.770323: I external/org_tensorflow/tensorflow/contrib/session_bundle/bundle_shim.cc:363] Attempting to load native SavedModelBundle in bundle-shim from: /root/models/averaged-ende-export500k/1
2019-06-13 12:33:37.770356: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:31] Reading SavedModel from: /root/models/averaged-ende-export500k/1
2019-06-13 12:33:37.929082: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:54] Reading meta graph with tags { serve }
2019-06-13 12:33:38.043197: I external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-13 12:33:38.061128: E external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: UNKNOWN ERROR (-1)
2019-06-13 12:33:38.061307: I external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_diagnostics.cc:155] no NVIDIA GPU device is present: /dev/nvidia0 does not exist
2019-06-13 12:33:38.384528: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:182] Restoring SavedModel bundle.
2019-06-13 12:33:39.314499: W external/org_tensorflow/tensorflow/core/framework/allocator.cc:124] Allocation of 65538048 exceeds 10% of system memory.
2019-06-13 12:33:41.349129: W external/org_tensorflow/tensorflow/core/framework/allocator.cc:124] Allocation of 65538048 exceeds 10% of system memory.
2019-06-13 12:33:43.118362: W external/org_tensorflow/tensorflow/core/framework/allocator.cc:124] Allocation of 65538048 exceeds 10% of system memory.
2019-06-13 12:33:44.070444: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:132] Running initialization op on SavedModel bundle.
2019-06-13 12:33:44.611261: I external/org_tensorflow/tensorflow/core/kernels/lookup_util.cc:376] Table trying to initialize from file /root/models/averaged-ende-export500k/1/assets/total-eng-hnd-vocab.txt is already initialized.
2019-06-13 12:33:44.611708: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:285] SavedModel load for tags { serve }; Status: success. Took 6841323 microseconds.
2019-06-13 12:33:44.611784: I tensorflow_serving/servables/tensorflow/saved_model_bundle_factory.cc:100] Wrapping session to perform batch processing
2019-06-13 12:33:44.611887: I tensorflow_serving/servables/tensorflow/bundle_factory_util.cc:153] Wrapping session to perform batch processing
2019-06-13 12:33:44.612256: I tensorflow_serving/servables/tensorflow/saved_model_warmup.cc:101] No warmup data file found at /root/models/averaged-ende-export500k/1/assets.extra/tf_serving_warmup_requests
2019-06-13 12:33:44.613021: I tensorflow_serving/core/loader_harness.cc:86] Successfully loaded servable version {name: enhi version: 1}
2019-06-13 12:33:44.631393: I tensorflow_serving/model_servers/server.cc:313] Running gRPC ModelServer at 0.0.0.0:51799 ...

General Observation: I tried running it in other PCs with similar CPU ( Pentium, Core 2 Duo) and had the same error. While it works in i3,i5 etc.

Any workaround to solve this issue.

The Docker image requires a CPU wtih AVX support. The only workaround is to redefine the Dockerfile and compile all TensorFlow binaries manually.