Merge pull request #46103 from teto/haskell_mnist

haskellPackages.tensorflow-mnist-input-data: fetch
This commit is contained in:
Bas van Dijk 2018-09-06 09:28:50 +02:00 committed by GitHub
commit 7158e7442f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 12 deletions

View File

@ -9054,12 +9054,6 @@ dont-distribute-packages:
temporary-resourcet: [ i686-linux, x86_64-linux, x86_64-darwin ]
tempus: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensor: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow-core-ops: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow-logging: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow-opgen: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow-ops: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow-proto: [ i686-linux, x86_64-linux, x86_64-darwin ]
tensorflow: [ i686-linux, x86_64-linux, x86_64-darwin ]
term-rewriting: [ i686-linux, x86_64-linux, x86_64-darwin ]
termbox-bindings: [ i686-linux, x86_64-linux, x86_64-darwin ]
termcolor: [ i686-linux, x86_64-linux, x86_64-darwin ]

View File

@ -55,13 +55,29 @@ in
tensorflow-logging = super.tensorflow-logging.override {
inherit proto-lens;
};
tensorflow-mnist = super.tensorflow-mnist.override {
tensorflow-mnist = overrideCabal (super.tensorflow-mnist.override {
inherit proto-lens;
};
# https://github.com/tensorflow/haskell/issues/215
tensorflow-mnist-input-data = self.tensorflow-mnist-input-data;
}) (_drv: { broken = false; });
tensorflow-mnist-input-data = setSourceRoot "tensorflow-mnist-input-data" (super.callPackage (
{ mkDerivation, base, bytestring, Cabal, cryptonite, directory
, filepath, HTTP, network-uri, stdenv
}:
let
fileInfos = {
"train-images-idx3-ubyte.gz" = "440fcabf73cc546fa21475e81ea370265605f56be210a4024d2ca8f203523609";
"train-labels-idx1-ubyte.gz" = "3552534a0a558bbed6aed32b30c495cca23d567ec52cac8be1a0730e8010255c";
"t10k-images-idx3-ubyte.gz" = "8d422c7b0a1c1c79245a5bcf07fe86e33eeafee792b84584aec276f5a2dbc4e6";
"t10k-labels-idx1-ubyte.gz" = "f7ae60f92e00ec6debd23a6088c31dbd2371eca3ffa0defaefb259924204aec6";
};
downloads = with pkgs.lib; flip mapAttrsToList fileInfos (name: sha256:
pkgs.fetchurl {
url = "http://yann.lecun.com/exdb/mnist/${name}";
inherit sha256;
});
in
mkDerivation {
pname = "tensorflow-mnist-input-data";
version = "0.1.0.0";
@ -71,6 +87,9 @@ in
base bytestring Cabal cryptonite directory filepath HTTP
network-uri
];
preConfigure = pkgs.lib.strings.concatStringsSep "\n" (
map (x: "ln -s ${x} data/$(stripHash ${x})") downloads
);
libraryHaskellDepends = [ base ];
homepage = "https://github.com/tensorflow/haskell#readme";
description = "Downloader of input data for training MNIST";

View File

@ -31,19 +31,19 @@ let
in stdenv.mkDerivation rec {
pname = "libtensorflow";
version = "1.10.0";
version = "1.9.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://storage.googleapis.com/tensorflow/${pname}/${pname}-${tfType}-${system}-${version}.tar.gz";
sha256 =
if system == "linux-x86_64" then
if cudaSupport
then "0v66sscxpyixjrf9yjshl001nix233i6chc61akx0kx7ial4l1wn"
else "11sbpcbgdzj8v17mdppfv7v1fn3nbzkdad60gc42y2j6knjbmwxb"
then "1q3mh06x344im25z7r3vgrfksfdsi8fh8ldn6y2mf86h4d11yxc3"
else "0l9ps115ng5ffzdwphlqmj3jhidps2v5afppdzrbpzmy41xz0z21"
else if system == "darwin-x86_64" then
if cudaSupport
then unavailable
else "11p0f77m4wycpc024mh7jx0kbdhgm0wp6ir6dsa8lkcpdb59bn59"
else "1qj0v1706w6mczycdsh38h2glyv5d25v62kdn98wxd5rw8f9v657"
else unavailable;
};