0

I tried to install Rasa on a server with an Intel Xeon E5620. Rasa needs Tensorflow 14.0.0. I use an virtual Environment (Anaconda)

I have to compile Tensorflow from source, because the CPU doesn't support AVX. I created a custom Built with docker-tensorflow-builder and install it. When I tested it, I got the message:

Traceback (most recent call last):
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/anaconda3/envs/ki/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/anaconda3/envs/ki/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/anaconda3/envs/ki/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/anaconda3/envs/ki/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /anaconda3/envs/ki/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

I fix it by install GlibC.2.30. Now i get the Error "Segmentation fault (core dumped) error". I think I get the error because Tensorflow is not adapted to my CPU. I'm not sure how to find out the appropriate compiler options and finally set them. Has anyone here experience and can help me?

JulianS.
  • 1
  • 1

1 Answers1

1

Here the problem is with gcc version. Please use gcc 6.4.0 for the installation of tensorflow.

Below are the steps to install Intel optimized tensorflow in conda environment.

conda create -n tf_1.10 -c intel python=3.6

source activate tf_1.10

Make sure the following lines are there in the bash_profile and source it.

export CC=/glob/development-tools/versions/gcc-6.4.0/bin/gcc

export LD_LIBRARY_PATH=/glob/development-tools/versions/gcc-6.4.0/lib64/:$LD_LIBRARY_PATH

export PATH=/glob/development-tools/versions/gcc-6.4.0/bin/:$PATH

If the path setting was successful, you should be able to see the gcc version 6.4.0 on typing gcc --version

If you get the error ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found, please follow the steps below:

mkdir ~/lib

cd ~/lib

ln -s /glob/supplementary-software/versions/glibc/glibc_2_28/lib/libm.so.6

Then export the LD_LIBRARY_PATH for it:

export LD_LIBRARY_PATH=~/lib:$LD_LIBRARY_PATH

Then, install tensorflow 1.10 using:

pip install https://storage.googleapis.com/intel-optimized-tensorflow/tensorflow-1.10.0-cp36-cp36m-linux_x86_64.whl