![]() ![]() (x_train, y_train),(x_test, y_test) = mnist.load_data() We create a test.py file with the following contents: import tensorflow as tf Now we run a small test to check that it works. bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkgĪnd we install the pip package python3 -m pip install -user /tmp/tensorflow_pkg/tensorflow-1.13.2-cp35-cp35m-linux_i686.whl If everything went ok, now we generate the pip package. bazel build -config=noaws -config=nohdfs -config=nokafka -config=noignite -config=nonccl -c opt -verbose_failures //tensorflow/tools/pip_package:build_pip_package Now we start compiling tensorflow disabling optional components like aws, kafka, etc. * When asked to specify optimization flags to use during compilation when bazel option "-config=opt" is specified : Just hit Enter * We should respond N to all the Y/N questions. * When asked to input the desired Python library path to use. : We should respond /usr/bin/python3 to use python 3. * When asked to specify the location of python. We have to take the following considerations: We need to explicity disable the use of several optional libraries that are not available or not supported on 32 bit systems. grep -Rl "lib64"| xargs sed -i 's/lib64/lib/g' mkdir Tensorflow-1.13.2īefore compiling, we replace the references to 64 bit libraries to the 32 bit ones. So 1.13.2 is the last version that runs in 32 bits. Starting from version 1.14, tensorflow uses the Intel MKL DNN optimization library that it only works in 64 bits systems. When it finishes (It can take several hours), we move the bazel compiled executable to some location in the current user's path cp output/bazel /home/user/.local/binĬreate a folder and clone tensorflow's 1.13.2 version to it. This bazel version works ok in 32 bits.Īlso we need to increase the java memory available to Bazel and start compiling it. src/tools/singlejar/mapped_file_posix.inc file ( #error This code for 64 bit Unix.) that throws an error if we are not in a 64 bit machine. wget īefore compiling, we need to remove line 30 of. We can obtain it and install in a new folder. We need the source code bazel 0.19.2 distribution. You can use eithr python 3 or python 2 and compile tensorflow for that version. sudo apt-get install python3-dev python3-pip python3-wheel Next, we install python 3 development libraries and the keras module that will be required by tensorflow. Sudo apt-get install git zip unzip autoconf automake libtool curl zlib1g-dev swig build-essential It's critical that the distribution has the version 8 of the Java SDK: openjdk-8-jdk Install the Java 8 SDK and build tools sudo apt-get update With only 1 GB of SWAP, some compilations failed. I set up the system to have 4 GB of SWAP space. I have tested both the Ubuntu 16.04 (Xenial) and Debian 9.11 (Stretch) systems with 2 GB of RAM. I also has been able to install it in a Debian 9 (stretch) 32 bits system, and the instructions are the same. Granted, it has been upgraded from the original 1 GB of RAM and an 80 GB HDD, to 2 GB of RAM and to 480 GB of SSD storage, that runs Ubuntu Xenial 32 bits without problems. I used the following steps to install tensorflow in a old Asus Eee-Pc 1000H. ![]() How to install Tensorflow in a 32 bits linux systemįollowing is a copy of the step list that I maintain in this github repository: tensorflow-32-bits-linux ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |