izard: (Default)
[personal profile] izard
To create a cuda/tensorflow docker image that works on cuda8/1070, get cuda docker image, and run a script:

yes| yum install which python-devel perl java-1.8.0-openjdk-headless.x86_64 java-1.8.0-openjdk-devel.x86_64 swig wget unzip zlib-devel file rsync
rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
yum -y update
yum -y install python-pip
pip install numpy
pip install wheel
wget https://github.com/bazelbuild/bazel/releases/download/0.3.1/bazel-0.3.1-installer-linux-x86_64.sh
chmod +x bazel-0.3.1-installer-linux-x86_64.sh
./bazel-0.3.1-installer-linux-x86_64.sh
rm -f bazel-0.3.1-installer-linux-x86_64.sh
cd tensorflow/
./configure
vi ../.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/eigen_archive/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
# add instead of return h2log1p ; float a1 = __low2float(a); float a2 = __high2float(a); float r1 = log1pf(a1); float r2 = log1pf(a2); return __floats2half2_rn(r1, r2);
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install /tmp/tensorflow_pkg/tensorflow-0.10.0rc0-py2-none-any.whl


I am too lazy to turn it into a proper docker config.

Profile

izard: (Default)
izard

November 2025

S M T W T F S
       1
2345678
910 1112131415
1617 1819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 17th, 2026 02:32 pm
Powered by Dreamwidth Studios