{% set version = "0.15.13" %}

package:
  name: caffe-nv
  version: {{ version }}

source:
  fn: caffe-nv_{{ version }}.tar.gz
  url: https://github.com/NVIDIA/caffe/archive/v{{ version }}.tar.gz
  sha1: 16b67ee7d0e9e204b3fe4aa73882ceaf57113bb3 
  patches:
    - 0001-add-hdf5_hl-to-cmake-dependencies.patch
    - 0002-disable-failing-ppc64le-unit-tests.patch  [ppc64le]

build:
  number: 0

requirements:
  build:
    - cmake
    - cython
    - boost 1.61.*
    - hdf5 1.8.17
    - gflags
    - glog
    - h5py
    - ipython
    - leveldb
    - lmdb
    - matplotlib
    - networkx
    - nose
    - numpy x.x
    - openblas 0.2.19
    - opencv 3.*
    - pandas
    - pillow
    - protobuf
    - python
    - python-dateutil
    - python-gflags
    - python-leveldb
    - pyyaml
    - scikit-image
    - scipy
    - six
    - snappy

  run:
    - boost 1.61.*
    - hdf5 1.8.17
    - gflags
    - glog
    - h5py
    - ipython
    - leveldb
    - lmdb
    - matplotlib
    - networkx
    - numpy x.x
    - openblas 0.2.19
    - opencv 3.*
    - pandas
    - pillow
    - protobuf
    - python
    - python-dateutil
    - python-gflags
    - python-leveldb
    - pyyaml
    - scikit-image
    - scipy
    - six
    - snappy

test:
  commands:
    # Test commands.
    - command -v "${PREFIX}/bin/caffe"
    - command -v "${PREFIX}/bin/classification"
    - command -v "${PREFIX}/bin/classify"
    - command -v "${PREFIX}/bin/compute_image_mean"
    - command -v "${PREFIX}/bin/convert_cifar_data"
    - command -v "${PREFIX}/bin/convert_imageset"
    - command -v "${PREFIX}/bin/convert_mnist_data"
    - command -v "${PREFIX}/bin/convert_mnist_siamese_data"
    - command -v "${PREFIX}/bin/detect"
    - command -v "${PREFIX}/bin/device_query"
    - command -v "${PREFIX}/bin/draw_net"
    - command -v "${PREFIX}/bin/extract_features"
    - command -v "${PREFIX}/bin/finetune_net"
    - command -v "${PREFIX}/bin/net_speed_benchmark"
    - command -v "${PREFIX}/bin/test_net"
    - command -v "${PREFIX}/bin/train_net"
    - command -v "${PREFIX}/bin/upgrade_net_proto_binary"
    - command -v "${PREFIX}/bin/upgrade_net_proto_text"
    - command -v "${PREFIX}/bin/upgrade_solver_proto_text"

    # Test includes.
    - test -d "${PREFIX}/include/caffe"

    # Test libraries.
    - test -f "${PREFIX}/lib/libcaffe-nv.so"

  imports:
    - caffe

about:
  home: https://github.com/NVIDIA/caffe
  license: BSD 2-Clause
  license_family: BSD
  summary: A deep learning framework made with expression, speed, and modularity in mind.
  description: |
    This is NVIDIA's fork of the Caffe project from BVLC.
    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 community contributors.
