diff --git a/ci_build/Dockerfile b/ci_build/Dockerfile index c0d801f..19b9d73 100644 --- a/ci_build/Dockerfile +++ b/ci_build/Dockerfile @@ -18,6 +18,8 @@ RUN \ echo 'deb http://download.fpcomplete.com/ubuntu trusty main'| tee /etc/apt/sources.list.d/fpco.list && \ apt-get update && \ apt-get install -y \ + # Required by snappy-frames dependency. + libsnappy-dev \ # Avoids /usr/bin/ld: cannot find -ltinfo libncurses5-dev \ # Makes stack viable in the container diff --git a/docker/Dockerfile b/docker/Dockerfile index 7f715de..86b7070 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,6 +6,8 @@ MAINTAINER TensorFlow authors RUN apt-get update RUN apt-get install -y \ + # Required by snappy-frames dependency. + libsnappy-dev \ # Avoids /usr/bin/ld: cannot find -ltinfo libncurses5-dev \ # Makes stack viable in the container diff --git a/stack.yaml b/stack.yaml index ff4f8c5..7cd45c3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -11,12 +11,16 @@ packages: - tensorflow-mnist-input-data - tensorflow-queue - tensorflow-nn +- tensorflow-records +- tensorflow-records-conduit - tensorflow-test extra-deps: # proto-lens is not yet in Stackage. - proto-lens-0.1.0.4 - proto-lens-protoc-0.1.0.4 +- snappy-framing-0.1.1 +- snappy-0.2.0.2 # Allow our custom Setup.hs scripts to import Data.ProtoLens.Setup from the version of # `proto-lens-protoc` in stack's local DB. See: diff --git a/tensorflow-records-conduit/Setup.hs b/tensorflow-records-conduit/Setup.hs new file mode 100644 index 0000000..e8ef27d --- /dev/null +++ b/tensorflow-records-conduit/Setup.hs @@ -0,0 +1,3 @@ +import Distribution.Simple + +main = defaultMain diff --git a/tensorflow-records-conduit/tensorflow-records-conduit.cabal b/tensorflow-records-conduit/tensorflow-records-conduit.cabal new file mode 100644 index 0000000..91b5d57 --- /dev/null +++ b/tensorflow-records-conduit/tensorflow-records-conduit.cabal @@ -0,0 +1,28 @@ +name: tensorflow-records-conduit +version: 0.1.0.0 +synopsis: Conduit wrappers for TensorFlow.Records. +homepage: https://github.com/tensorflow/haskell#readme +license: Apache +author: TensorFlow authors +maintainer: tensorflow-haskell@googlegroups.com +copyright: Google Inc. +category: Machine Learning +build-type: Simple +cabal-version: >=1.22 + +library + hs-source-dirs: src + exposed-modules: TensorFlow.Records.Conduit + build-depends: base >= 4.7 && < 5 + , bytestring + , cereal-conduit + , conduit + , conduit-extra + , exceptions + , resourcet + , tensorflow-records + default-language: Haskell2010 + +source-repository head + type: git + location: https://github.com/tensorflow/haskell diff --git a/tensorflow-records/Setup.hs b/tensorflow-records/Setup.hs new file mode 100644 index 0000000..e8ef27d --- /dev/null +++ b/tensorflow-records/Setup.hs @@ -0,0 +1,3 @@ +import Distribution.Simple + +main = defaultMain diff --git a/tensorflow-records/tensorflow-records.cabal b/tensorflow-records/tensorflow-records.cabal new file mode 100644 index 0000000..368791f --- /dev/null +++ b/tensorflow-records/tensorflow-records.cabal @@ -0,0 +1,40 @@ +name: tensorflow-records +version: 0.1.0.0 +synopsis: Encoder and decoder for the TensorFlow \"TFRecords\" format. +homepage: https://github.com/tensorflow/haskell#readme +license: Apache +author: TensorFlow authors +maintainer: tensorflow-haskell@googlegroups.com +copyright: Google Inc. +category: Machine Learning +build-type: Simple +cabal-version: >=1.22 + +library + hs-source-dirs: src + exposed-modules: TensorFlow.Records + other-modules: TensorFlow.CRC32C + build-depends: base >= 4.7 && < 5 + , bytestring + , cereal + -- TODO: Split Data.Digest.CRC32C out of snappy-framing for a + -- lighter dependency? + , snappy-framing + default-language: Haskell2010 + +Test-Suite RecordsTest + default-language: Haskell2010 + type: exitcode-stdio-1.0 + main-is: Main.hs + hs-source-dirs: tests + build-depends: base + , bytestring + , cereal + , tensorflow-records + , test-framework + , test-framework-quickcheck2 + + +source-repository head + type: git + location: https://github.com/tensorflow/haskell