mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-26 21:09:44 +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
|
cd third_party/tensorflow
|
||||||
./configure # Choose the defaults when prompted
|
./configure # Choose the defaults when prompted
|
||||||
bazel build -c opt tensorflow:libtensorflow_c.so
|
bazel build -c opt tensorflow:libtensorflow_c.so
|
||||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib/libtensorflow_c.dylib
|
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib/libtensorflow.dylib
|
||||||
install_name_tool -id libtensorflow_c.dylib /usr/local/lib/libtensorflow_c.dylib
|
install_name_tool -id libtensorflow.dylib /usr/local/lib/libtensorflow.dylib
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
- Run stack:
|
- Run stack:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# stack to be installed on the host. This comes at the expense of
|
# stack to be installed on the host. This comes at the expense of
|
||||||
# flexibility.
|
# flexibility.
|
||||||
|
|
||||||
FROM tensorflow/tensorflow:nightly-devel
|
FROM tensorflow/tensorflow:1.0.0-rc1
|
||||||
MAINTAINER TensorFlow authors <tensorflow-haskell@googlegroups.com>
|
MAINTAINER TensorFlow authors <tensorflow-haskell@googlegroups.com>
|
||||||
|
|
||||||
# The build context directory is the top of the tensorflow-haskell
|
# The build context directory is the top of the tensorflow-haskell
|
||||||
|
@ -25,12 +25,11 @@ RUN \
|
||||||
libcurl3-dev \
|
libcurl3-dev \
|
||||||
stack && \
|
stack && \
|
||||||
# Installs protoc and the libraries.
|
# Installs protoc and the libraries.
|
||||||
( cd third_party/tensorflow && \
|
curl -O -L https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip && \
|
||||||
tensorflow/tools/ci_build/builds/configured CPU && \
|
unzip -d /usr/local protoc-3.2.0-linux-x86_64.zip bin/protoc && \
|
||||||
bazel build -c opt '@protobuf//:protoc' && \
|
chmod 755 /usr/local/bin/protoc && \
|
||||||
install -s bazel-bin/external/protobuf/protoc /usr/local/bin && \
|
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz && \
|
||||||
bazel build -c opt '//tensorflow:libtensorflow_c.so' && \
|
tar zxf libtensorflow-cpu-linux-x86_64-1.0.0-rc0.tar.gz -C /usr/local && \
|
||||||
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \
|
ldconfig && \
|
||||||
ldconfig ) && \
|
|
||||||
stack setup --resolver=${STACK_RESOLVER} && \
|
stack setup --resolver=${STACK_RESOLVER} && \
|
||||||
stack test --resolver=${STACK_RESOLVER} --only-dependencies
|
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
|
IMAGE_NAME=tensorflow/haskell/ci_build:$STACK_RESOLVER
|
||||||
|
|
||||||
git submodule update
|
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 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
|
docker run $IMAGE_NAME stack build --resolver=$STACK_RESOLVER --pedantic --test
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
# Prepare the image with:
|
# Prepare the image with:
|
||||||
# docker build -t tensorflow/haskell:v0 docker
|
# 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>
|
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
|
RUN apt-get update
|
||||||
|
|
||||||
|
@ -27,4 +18,13 @@ RUN dpkg-reconfigure locales && \
|
||||||
locale-gen en_US.UTF-8 && \
|
locale-gen en_US.UTF-8 && \
|
||||||
update-locale LANG=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
|
ENV LANG en_US.UTF-8
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
||||||
-- limitations under the License.
|
-- limitations under the License.
|
||||||
|
|
||||||
-- | Generates the wrappers for Ops shipped with tensorflow_c.
|
-- | Generates the wrappers for Ops shipped with tensorflow.
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Distribution.Simple.BuildPaths (autogenModulesDir)
|
import Distribution.Simple.BuildPaths (autogenModulesDir)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: tensorflow-core-ops
|
name: tensorflow-core-ops
|
||||||
version: 0.1.0.0
|
version: 0.1.0.0
|
||||||
synopsis: Haskell wrappers for Core Tensorflow Ops.
|
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
|
homepage: https://github.com/tensorflow/haskell#readme
|
||||||
license: Apache
|
license: Apache
|
||||||
author: TensorFlow authors
|
author: TensorFlow authors
|
||||||
|
|
|
@ -47,7 +47,7 @@ library
|
||||||
, temporary
|
, temporary
|
||||||
, transformers
|
, transformers
|
||||||
, vector
|
, vector
|
||||||
extra-libraries: tensorflow_c
|
extra-libraries: tensorflow
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
include-dirs: .
|
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