-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add caffe #256
Add caffe #256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Setup CMake build location | ||
mkdir build | ||
cd build | ||
|
||
# Configure, build, test, and install. | ||
cmake -DCPU_ONLY=1 -DBLAS="open" -DCMAKE_INSTALL_PREFIX="${PREFIX}" .. | ||
make | ||
make runtest | ||
make install | ||
|
||
# Python installation is non-standard. So, we're fixing it. | ||
mv "${PREFIX}/python/caffe" "${SP_DIR}/" | ||
for FILENAME in $( cd "${PREFIX}/python/" && find . -name "*.py" | sed 's|./||' ); | ||
do | ||
chmod +x "${PREFIX}/python/${FILENAME}" | ||
cp "${PREFIX}/python/${FILENAME}" "${PREFIX}/bin/${FILENAME//.py}" | ||
done | ||
rm -rf "${PREFIX}/python/" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{% set base_version = "1.0.0" %} | ||
{% set version_postfix = "rc3" %} | ||
{% set version = base_version + version_postfix %} | ||
|
||
package: | ||
name: caffe | ||
version: {{ version }} | ||
|
||
source: | ||
fn: caffe_{{ version }}.tar.gz | ||
url: https://github.com/BVLC/caffe/archive/{{ version_postfix }}.tar.gz | ||
sha1: 79e075d06bea856164c926b92a40242b0369965b | ||
|
||
build: | ||
number: 0 | ||
skip: true # [not (linux and py27)] | ||
features: | ||
- nomkl | ||
|
||
requirements: | ||
build: | ||
- cmake | ||
- cython | ||
- nomkl | ||
- openblas | ||
- boost | ||
- hdf5 | ||
- gflags | ||
- glog | ||
- h5py | ||
- hdf5 | ||
- ipython | ||
- leveldb | ||
- lmdb | ||
- matplotlib | ||
- networkx | ||
- nose | ||
- numpy | ||
- opencv 2.* | ||
- pandas | ||
- pillow | ||
- protobuf | ||
- python | ||
- python-dateutil | ||
- python-gflags | ||
- python-leveldb | ||
- pyyaml | ||
- scikit-image | ||
- scipy | ||
- six | ||
- snappy | ||
|
||
run: | ||
- nomkl | ||
- openblas | ||
- boost | ||
- hdf5 | ||
- gflags | ||
- glog | ||
- h5py | ||
- hdf5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hdf5 is an implicit dependency, I think. the h5py dependency will get it. Only include it if they drectly use the HDF5 API and link against it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I believe they do link against it. |
||
- ipython | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is IPython actually required for things to run? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, with most of the python dependencies I am not sure to what extent they are needed. Do they actually run something with them or are they simply installed for the user's benefit? Would be nice to get clarification/confirmation on this from upstream. At present, installing the kitchen sink seems like the safe way forward. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, see this comment for more details. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Pick your battles. This one makes me too eager to go in and make sure they have clean interfaces on each of the C++/python sides. In my infinite spare time, of course. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Right?! There are a few worrisome things here for sure, but yes time is an issue. Hoping when they hit |
||
- leveldb | ||
- lmdb | ||
- matplotlib | ||
- networkx | ||
- numpy | ||
- opencv 2.* | ||
- pandas | ||
- pillow | ||
- protobuf | ||
- python | ||
- python-dateutil | ||
- python-gflags | ||
- python-leveldb | ||
- pyyaml | ||
- scikit-image | ||
- scipy | ||
- six | ||
- snappy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear how many of these are needed and how many are simply recommended for examples or similar. In any event, it is easier to bundle everything they specify for the system and for their python environment. Though a few we know to drop from run time like Cython. |
||
|
||
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could still add some Python binaries. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. It would be good to test at least one of the things you moved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They have been added. |
||
|
||
# Test includes. | ||
- test -d "${PREFIX}/include/caffe" | ||
|
||
# Test libraries. | ||
- test -f "${PREFIX}/lib/libcaffe.so" | ||
|
||
imports: | ||
- caffe | ||
|
||
about: | ||
home: http://caffe.berkeleyvision.org/ | ||
license: BSD 2-Clause | ||
summary: A deep learning framework made with expression, speed, and modularity in mind. | ||
|
||
extra: | ||
recipe-maintainers: | ||
- jakirkham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty hacky here. However, the install just dumps all of the Python stuff in
${PREFIX}/python
, which is not cool. So, we try to resort it based on where it should have gone. Should work with upstream to fix this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point them to cookiecutter: https://github.com/audreyr/cookiecutter
Shouldn't need much work to use that for the drudge work, then just copy their whole folder structure in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will keep that in mind. Thanks.