mirror of
https://github.com/tensorflow/haskell.git
synced 2024-12-24 18:49:46 +01:00
Uprev to TF 1.0rc1. (#69)
* Download protoc and libtensorflow instead of running bazel. * Explicitly set permissions of protoc.
This commit is contained in:
parent
4b5a57152f
commit
72631cb9f3
8 changed files with 23 additions and 25 deletions
|
@ -106,8 +106,8 @@ The following instructions were verified with Mac OS X El Capitan.
|
|||
cd third_party/tensorflow
|
||||
./configure # Choose the defaults when prompted
|
||||
bazel build -c opt tensorflow:libtensorflow_c.so
|
||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib/libtensorflow_c.dylib
|
||||
install_name_tool -id libtensorflow_c.dylib /usr/local/lib/libtensorflow_c.dylib
|
||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib/libtensorflow.dylib
|
||||
install_name_tool -id libtensorflow.dylib /usr/local/lib/libtensorflow.dylib
|
||||
cd ../..
|
||||
|
||||
- Run stack:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# stack to be installed on the host. This comes at the expense of
|
||||
# flexibility.
|
||||
|
||||
FROM tensorflow/tensorflow:nightly-devel
|
||||
FROM tensorflow/tensorflow:1.0.0-rc1
|
||||
MAINTAINER TensorFlow authors <tensorflow-haskell@googlegroups.com>
|
||||
|
||||
# The build context directory is the top of the tensorflow-haskell
|
||||
|
@ -25,12 +25,11 @@ RUN \
|
|||
libcurl3-dev \
|
||||
stack && \
|
||||
# Installs protoc and the libraries.
|
||||
( cd third_party/tensorflow && \
|
||||
tensorflow/tools/ci_build/builds/configured CPU && \
|
||||
bazel build -c opt '@protobuf//:protoc' && \
|
||||
install -s bazel-bin/external/protobuf/protoc /usr/local/bin && \
|
||||
bazel build -c opt '//tensorflow:libtensorflow_c.so' && \
|
||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \
|
||||
ldconfig ) && \
|
||||
curl -O -L https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip && \
|
||||
unzip -d /usr/local protoc-3.2.0-linux-x86_64.zip bin/protoc && \
|
||||
chmod 755 /usr/local/bin/protoc && \
|
||||
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz && \
|
||||
tar zxf libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz -C /usr/local && \
|
||||
ldconfig && \
|
||||
stack setup --resolver=${STACK_RESOLVER} && \
|
||||
stack test --resolver=${STACK_RESOLVER} --only-dependencies
|
||||
|
|
|
@ -8,6 +8,5 @@ STACK_RESOLVER=${STACK_RESOLVER:-lts-6.2}
|
|||
IMAGE_NAME=tensorflow/haskell/ci_build:$STACK_RESOLVER
|
||||
|
||||
git submodule update
|
||||
docker pull tensorflow/tensorflow:nightly-devel
|
||||
docker build --build-arg STACK_RESOLVER=$STACK_RESOLVER -t $IMAGE_NAME -f ci_build/Dockerfile .
|
||||
docker run $IMAGE_NAME stack build --resolver=$STACK_RESOLVER --pedantic --test
|
||||
|
|
|
@ -1,16 +1,7 @@
|
|||
# Prepare the image with:
|
||||
# docker build -t tensorflow/haskell:v0 docker
|
||||
FROM tensorflow/tensorflow:nightly-devel
|
||||
FROM tensorflow/tensorflow:1.0.0-rc1
|
||||
MAINTAINER TensorFlow authors <tensorflow-haskell@googlegroups.com>
|
||||
# Installs protoc and the libraries.
|
||||
RUN \
|
||||
cd /tensorflow && \
|
||||
bazel --batch build -c opt '@protobuf//:protoc' && \
|
||||
install -s bazel-bin/external/protobuf/protoc /usr/local/bin && \
|
||||
bazel --batch build -c opt '//tensorflow:libtensorflow_c.so' && \
|
||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \
|
||||
ldconfig && \
|
||||
bazel --batch clean
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
|
@ -27,4 +18,13 @@ RUN dpkg-reconfigure locales && \
|
|||
locale-gen en_US.UTF-8 && \
|
||||
update-locale LANG=en_US.UTF-8
|
||||
|
||||
# Installs protoc and the libraries.
|
||||
RUN \
|
||||
curl -O -L https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip && \
|
||||
unzip -d /usr/local protoc-3.2.0-linux-x86_64.zip bin/protoc && \
|
||||
chmod 755 /usr/local/bin/protoc && \
|
||||
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz && \
|
||||
tar zxf libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz -C /usr/local && \
|
||||
ldconfig
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
-- | Generates the wrappers for Ops shipped with tensorflow_c.
|
||||
-- | Generates the wrappers for Ops shipped with tensorflow.
|
||||
module Main where
|
||||
|
||||
import Distribution.Simple.BuildPaths (autogenModulesDir)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: tensorflow-core-ops
|
||||
version: 0.1.0.0
|
||||
synopsis: Haskell wrappers for Core Tensorflow Ops.
|
||||
description: Code generated signatures for the Ops in libtensorflow_c.
|
||||
description: Code generated signatures for the Ops in libtensorflow.
|
||||
homepage: https://github.com/tensorflow/haskell#readme
|
||||
license: Apache
|
||||
author: TensorFlow authors
|
||||
|
|
|
@ -47,7 +47,7 @@ library
|
|||
, temporary
|
||||
, transformers
|
||||
, vector
|
||||
extra-libraries: tensorflow_c
|
||||
extra-libraries: tensorflow
|
||||
default-language: Haskell2010
|
||||
include-dirs: .
|
||||
|
||||
|
|
2
third_party/tensorflow
vendored
2
third_party/tensorflow
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 48c433f48bb3aee5bc8efe579f7a4e48e8615f4d
|
||||
Subproject commit 0c68156ffcf918df905f9f39a632888724c66c3b
|
Loading…
Reference in a new issue