caffe: move defaults to package file

This commit is contained in:
Jan Malakhovski 2019-02-03 15:32:15 +00:00
parent 49148a3ea2
commit 31aa884b7f
2 changed files with 7 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, runCommand { config, stdenv, lib, runCommand
, fetchFromGitHub , fetchFromGitHub
, fetchurl , fetchurl
, cmake , cmake
@ -13,8 +13,8 @@
, Accelerate, CoreGraphics, CoreVideo , Accelerate, CoreGraphics, CoreVideo
, lmdbSupport ? true, lmdb , lmdbSupport ? true, lmdb
, leveldbSupport ? true, leveldb, snappy , leveldbSupport ? true, leveldb, snappy
, cudaSupport ? stdenv.isLinux, cudatoolkit , cudaSupport ? config.cudaSupport or false, cudatoolkit
, cudnnSupport ? false, cudnn ? null , cudnnSupport ? cudaSupport, cudnn ? null
, ncclSupport ? false, nccl ? null , ncclSupport ? false, nccl ? null
, pythonSupport ? false, python ? null, numpy ? null , pythonSupport ? false, python ? null, numpy ? null
}: }:

View File

@ -21850,20 +21850,16 @@ in
### SCIENCE / MATH ### SCIENCE / MATH
caffe = callPackage ../applications/science/math/caffe rec { caffe = callPackage ../applications/science/math/caffe ({
cudaSupport = config.caffe.cudaSupport or config.cudaSupport or false; opencv3 = opencv3WithoutCuda; # Used only for image loading.
cudnnSupport = cudaSupport;
# Used only for image loading.
opencv3 = opencv3WithoutCuda;
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo; inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo;
}; } // (config.caffe or {}));
caffe2 = callPackage ../development/libraries/science/math/caffe2 (rec { caffe2 = callPackage ../development/libraries/science/math/caffe2 (rec {
inherit (python36Packages) python future six numpy pydot; inherit (python36Packages) python future six numpy pydot;
protobuf = protobuf3_1; protobuf = protobuf3_1;
python-protobuf = python36Packages.protobuf.override { inherit protobuf; }; python-protobuf = python36Packages.protobuf.override { inherit protobuf; };
# Used only for image loading. opencv3 = opencv3WithoutCuda; # Used only for image loading.
opencv3 = opencv3WithoutCuda;
}); });
cntk = callPackage ../applications/science/math/cntk rec { cntk = callPackage ../applications/science/math/cntk rec {