From 8597cac55224db8390ac365c1b2f5d5c5920fdde Mon Sep 17 00:00:00 2001 From: Judah Jacobson Date: Wed, 15 Mar 2017 10:24:50 -0700 Subject: [PATCH] Test downloading mnist. --- ci_build/Dockerfile | 4 ++-- ci_build/outer_launch_tests.sh | 3 ++- tensorflow-mnist-input-data/Setup.hs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci_build/Dockerfile b/ci_build/Dockerfile index 19b9d73..e54a76f 100644 --- a/ci_build/Dockerfile +++ b/ci_build/Dockerfile @@ -33,5 +33,5 @@ RUN \ 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 + stack setup --resolver=${STACK_RESOLVER} + #stack test --resolver=${STACK_RESOLVER} --only-dependencies diff --git a/ci_build/outer_launch_tests.sh b/ci_build/outer_launch_tests.sh index ace0a31..c851f35 100755 --- a/ci_build/outer_launch_tests.sh +++ b/ci_build/outer_launch_tests.sh @@ -8,5 +8,6 @@ STACK_RESOLVER=${STACK_RESOLVER:-lts-6.2} IMAGE_NAME=tensorflow/haskell/ci_build:$STACK_RESOLVER git submodule update + 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 tensorflow-mnist-input-data diff --git a/tensorflow-mnist-input-data/Setup.hs b/tensorflow-mnist-input-data/Setup.hs index e858987..6da8eb2 100644 --- a/tensorflow-mnist-input-data/Setup.hs +++ b/tensorflow-mnist-input-data/Setup.hs @@ -65,6 +65,7 @@ httpDownload url outFile = do let uri = fromMaybe (error ("Can't be: invalid URI " ++ url)) (URI.parseURI url) + hPutStrLn stderr $ show uri result <- HTTP.simpleHTTP (HTTP.defaultGETRequest_ uri) HTTP.getResponseCode result >>= \case (2, 0, 0) -> HTTP.getResponseBody result >>= B.writeFile outFile