1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-26 21:09:44 +01:00

Update Mac build instructions. (#73)

- Use the prebuilt binaries/headers for TF 1.0rc.
- Add instructions and stack.yaml config for tensorflow-records's dependency on
  snappy.
This commit is contained in:
Judah Jacobson 2017-02-12 22:17:38 -08:00 committed by Greg Steuck
parent 65a1220b90
commit dca49d8993
2 changed files with 9 additions and 20 deletions

View file

@ -91,32 +91,19 @@ There is also a demo application:
The following instructions were verified with Mac OS X El Capitan. The following instructions were verified with Mac OS X El Capitan.
- Install the "protoc" binary somewhere in your PATH. You can get it by
downloading the corresponding file for your system from
https://github.com/google/protobuf/releases. (The corresponding file will be
named something like `protoc-*-.zip`.)
- Install dependencies via [Homebrew](http://brew.sh): - Install dependencies via [Homebrew](http://brew.sh):
brew install swig brew install protobuf
brew install bazel brew install snappy
- Build the TensorFlow library and install it on your machine: - Install the TensorFlow library on your machine:
cd third_party/tensorflow curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-1.0.0-rc0.tar.gz > libtensorflow.tar.gz
./configure # Choose the defaults when prompted tar zxf libtensorflow.tar.gz -C /usr/local
bazel build -c opt tensorflow:libtensorflow_c.so mv /usr/local/lib/libtensorflow.so /usr/local/lib/libtensorflow.dylib
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib/libtensorflow.dylib
install_name_tool -id libtensorflow.dylib /usr/local/lib/libtensorflow.dylib install_name_tool -id libtensorflow.dylib /usr/local/lib/libtensorflow.dylib
cd ../.. rm libtensorflow.tar.gz
- Run stack: - Run stack:
stack test stack test
Note: you may need to upgrade your version of Clang if you get an error like the following:
tensorflow/core/ops/ctc_ops.cc:60:7: error: return type 'tensorflow::Status' must match previous return type 'const ::tensorflow::Status' when lambda expression has unspecified explicit return type
return Status::OK();
In that case you can just upgrade XCode and then run `gcc --version` to get the new version of the compiler.

View file

@ -31,3 +31,5 @@ explicit-setup-deps:
# For Mac OS X, whose linker doesn't use this path by default: # For Mac OS X, whose linker doesn't use this path by default:
extra-lib-dirs: extra-lib-dirs:
- /usr/local/lib - /usr/local/lib
extra-include-dirs:
- /usr/local/include