on master help sign in
Reenable and fix the tensorflow-* packages.

Previously we installed libtensorflow into /usr/local/lib which wasn't in the search path. Moving it to /usr/lib fixed the problem. Also changed the script to manually install protoc v3.3.0. The default version of `protobuf-compiler` in Xenial is v2.6.1 which is too old to build `tensorflow-proto`. Verified by building the docker image locally and then running `stack install tensorflow tensorflow-ops ...` from within it.

commit4f73bb75b747e2d6b29074dfa468e442c40f453b authorJudah Jacobson <judah@users.noreply.github.com> dateTue 16 May 2017, 13:23 (9 years ago) parentc724ced
2 files changed+10−5
build-constraints.yaml+3−3 debian-bootstrap.sh+7−2
build-constraints.yaml+3−3
@@ -3021,10 +3021,10 @@ packages:
30213021 - proto-lens-combinators
30223022 - proto-lens-arbitrary
30233023 - proto-lens-optparse
3024− # - tensorflow # blocked on C library
3025− # - tensorflow-core-ops # blocked on C library
3024+ - tensorflow
3025+ - tensorflow-core-ops
30263026 - tensorflow-opgen
3027− # - tensorflow-ops # blocked on C library
3027+ - tensorflow-ops
30283028 - tensorflow-proto
30293029 - tensorflow-test
30303030
debian-bootstrap.sh+7−2
@@ -123,7 +123,6 @@ apt-get install -y \
123123 nodejs \
124124 npm \
125125 openjdk-8-jdk \
126− protobuf-compiler \
127126 python-mpltoolkits.basemap \
128127 python3-matplotlib \
129128 python3-numpy \
@@ -191,9 +190,15 @@ wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
191190 && apt-get update \
192191 && apt-get install -y llvm-4.0
193192
193+# Install version 3 of the protobuf compiler. (The `protobuf-compiler` package only
194+# supports version 2.)
195+curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip \
196+ && sudo unzip -o protoc-3.3.0-linux-x86_64.zip -d /usr bin/protoc \
197+ && rm -f protoc-3.3.0-linux-x84_64.zip
198+
194199# Install the TensorFlow C API.
195200curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
196− && sudo tar zxf libtensorflow.tar.gz -C /usr/local \
201+ && sudo tar zxf libtensorflow.tar.gz -C /usr \
197202 && rm libtensorflow.tar.gz \
198203 && ldconfig
199204