diff options
author | William Casarin <bill@casarin.me> | 2015-07-04 16:42:54 -0700 |
---|---|---|
committer | William Casarin <bill@casarin.me> | 2015-07-08 10:07:10 -0700 |
commit | 8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b (patch) | |
tree | ace23a4aafdbf614676ec1ddd6020c521830e51a /pkgs/applications/science | |
parent | 1f2388044930c05c61584bf7a4bdec7a63ef02f4 (diff) | |
download | nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar.gz nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar.bz2 nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar.lz nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar.xz nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.tar.zst nixlib-8ead9cf0c51dc03f6a29fbb421fc923fa978ac4b.zip |
caffe: init at rev 77d66dfc
Initial version of the Caffe deep learning framework from Berkeley
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/math/caffe/default.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix new file mode 100644 index 000000000000..fc7d96115294 --- /dev/null +++ b/pkgs/applications/science/math/caffe/default.nix @@ -0,0 +1,70 @@ +{ stdenv +, openblas +, boost +, cudaSupport ? true +, cudnnSupport ? false +, cudnn ? null +, cudatoolkit7 +, fetchFromGitHub +, google-gflags +, glog +, hdf5 +, leveldb +, lmdb +, opencv +, protobuf +, snappy +}: + + +let optional = stdenv.lib.optional; +in stdenv.mkDerivation rec { + # Use git revision because latest "release" is really old + name = "caffe-git-2015-07-02"; + + src = fetchFromGitHub { + owner = "BVLC"; + repo = "caffe"; + rev = "77d66dfc907dd875d69bb9fc12dd950b531e464f"; + sha256 = "0vd4qrc49dhsawj298xpkd5mvi35sh56kdswx3yp8ya4fjajwakx"; + }; + + preConfigure = "mv Makefile.config.example Makefile.config"; + + makeFlags = "BLAS=open " + + (if !cudaSupport then "CPU_ONLY=1 " else "CUDA_DIR=${cudatoolkit7} ") + + (if cudnnSupport then "USE_CUDNN=1 " else ""); + + # too many issues with tests to run them for now + doCheck = false; + checkPhase = "make runtest ${makeFlags}"; + + buildInputs = [ openblas boost google-gflags glog hdf5 leveldb lmdb opencv + protobuf snappy ] + ++ optional cudaSupport cudatoolkit7 + ++ optional cudnnSupport cudnn; + + installPhase = '' + mkdir -p $out/{bin,share,lib} + for bin in $(find build/tools -executable -type f -name '*.bin'); + do + cp $bin $out/bin/$(basename $bin .bin) + done + + cp -r build/examples $out/share + cp -r build/lib $out + ''; + + meta = with stdenv.lib; { + description = "Deep learning framework"; + longDescription = '' + Caffe is a deep learning framework made with expression, speed, and + modularity in mind. It is developed by the Berkeley Vision and Learning + Center (BVLC) and by community contributors. + ''; + homepage = http://caffe.berkeleyvision.org/; + maintainers = with maintainers; [ jb55 ]; + license = licenses.bsd2; + platforms = platforms.linux; + }; +} |