[caffe-contrib] 300/362: README.Debian: update readme
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Tue May 3 09:24:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository caffe-contrib.
commit fec8c1f132a309f63cab38a9e2cbb1a5fa152290
Author: Zhou Mo <cdluminate at gmail.com>
Date: Wed Mar 9 09:32:58 2016 +0000
README.Debian: update readme
---
debian/README.Debian | 169 ++++++++++++++++-----------------------------------
1 file changed, 54 insertions(+), 115 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 4d07955..0f94db1 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,141 +1,87 @@
Caffe for Debian
================
- In short, package "Caffe" for Debian is designed as following 2
- suites, which are conflicting with each other[1] (i.e. you cannot
- install them together on your system):
+ In short, package "Caffe" for Debian is compiled as 2 sets of packages,
+ but the two sets are not co-installable. [1]
- * Caffe-CPU suite:
+ * Caffe-CPU: (configured as CPU_ONLY)
- - caffe-cpu
- - libcaffe-cpu0 (i.e. libcaffe-cpu${SOVERSION})
- - libcaffe-cpu-dev
- - python-caffe-cpu
+ * caffe-cpu -- command line utilities
+ * libcaffe-cpu* -- core library
+ * libcaffe-cpu-dev -- development files
+ * python-caffe-cpu -- python2 interface
- * Caffe-CUDA suite:
+ * Caffe-CUDA: (compiled with CUDA)
- - caffe-cuda
- - libcaffe-cuda0 (i.e. libcaffe-cuda${SOVERSION})
- - libcaffe-cuda-dev
- - python-caffe-cuda
+ * caffe-cuda
+ * libcaffe-cuda*
+ * libcaffe-cuda-dev
+ * python-caffe-cuda
- Where
+ Happy Deep Learning ! :-)
- - caffe-{cpu,cuda} are the command line interface of caffe
- - libcaffe* are the core shared library of caffe
- - libcaffe-*-dev are the development files of caffe (incl. headers)
- - python-caffe-* are the python2 interfaces of caffe
- So pick a suite and enjoy Deep Learning ! :-)
+ Custom Build of Caffe
+ =====================
+ Compiling caffe locally may bring better machine performance.
+ Inspired by Debian's OpenBLAS packaging, I provid 2 custom targets for
+ users to build customized caffe Packages for local use:
- Custom Build Caffe
- ==================
+ * custom-cpu
+ * custom-cuda
- As we know, for computation-intensive applications such as caffe,
- compiling it locally would bring you better machine performance.
- Inspired by Debian's OpenBLAS packaging, the packager [A] of caffe
- provided 2 custom targets for you to build customed local Debian
- Package of caffe: "custom-cpu" and "custom-cuda".
+ Instructions for doing local custom build:
- Instructions for doing local custom build [2]:
+ 1. Install Build-Dependencies, including Debian packaging utils.
- 1. Install Debian Packaging toolchain:
- $ apt install build-essential debhelper devscripts
+ * Packaging helpers:
- 2. Install Build-Dependencies:
- $ apt-get build-dep caffe <- this may work in the future[3]
+ $ apt install build-essential debhelper devscripts
- Currently please follow this work-around:
- * Take a look at debian/control
- * Satisfy build dependencies manually........
+ * Build-Dependencies:
- 3. Have a look at tail part of debian/rules, and tweak some
- variables as you need:
- (please note that debian/rules is a Makefile)
+ $ apt-get build-dep caffe
- * CUSTOM_JOBS := "-j4"
- This is the "--jobs" argument passed to "make", by default I
- set it to 4 jobs.
+ Or install build-dependencies manually, the dependency information
+ is stored at debian/control.
+
+ 2. [Can skip] Have a look at the tail part of debian/rules, and tweak some
+ variables as long as you need. (note that debian/rules is a Makefile)
+ Here are some hints:
+
+ * CUSTOM_JOBS := "-j5"
+ Parallel compiling jobs, i.e. make -j5
* CONFFLAG_CPU_CUSTOM = ...
- Only tweak this when you are going to customize the
- caffe-cpu suite, and this variable stores cmake options.
+ Tweak this when you like to compile the caffe-cpu set,
+ and this variable stores cmake options.
* CONFFLAG_CUDA_CUSTOM = ...
- Only tweak this when you are going to customize the
- caffe-cuda suite, and this variable stores cmake options.
+ Tweak this when you like to compile the caffe-cuda set,
+ and this variable stores cmake options.
- 4. Start compiling:
- (make sure you are stading at the root of source tree)
+ 3. Start compiling. (make sure you are in the root of source tree)
- If you are going to compile caffe-cpu suite:
+ Compiling caffe-cpu set:
$ debian/rules custom-cpu
- If you are going to compile caffe-cuda suite:
+ Compiling caffe-cuda set:
$ debian/rules custom-cuda
- By the default custom options, it should finely build packages.
- However there's no any promise that the custom build will work,
- Especially after tweaked.
-
- 5. Install freshly cooked Caffe Package:
- * change directory to the parent directory of source tree root
- $ cd ..
- * see the build result
- $ ls *.deb
-
- If nothing went wrong, install them running [4]
- $ sudo dpkg -i libcaffe-*.deb
- $ sudo dpkg -i caffe-* python*
-
- 6. Done.
+ The default custom configuration is tested, however there's no
+ promise that the custom build will not fail.
-
- Bump Python2 to Python3
- ============================
-
- 1. with patch
- -------------
-
- Yes, it is possible to make python-caffe (python3 interface) packages
- from this source.
-
- $ cd <source_root>
- $ patch -p1 < debian/patches/unapplied/bump*.patch
-
- Then please do a custom build following the guide above.
+ 4. Installing fresh Caffe Package
- NOTICE: that patch may be a little out of date.
- Hence extra manual edit may be need.
+ * check the resulting packages
+ $ ls ../*.deb
- 2. Manually
- -----------
+ If nothing went wrong, install them by running [2]
+ $ sudo dpkg -i libcaffe-*.deb
+ $ sudo dpkg -i caffe-*.deb python-caffe-*.deb
- When manually bumping python version, please make sure to edit these
- files properly:
-
- * file: debian/control
- Carefully edit these entries:
-
- + Build-deps
- + X-Python-Version
- + Short description and Description
- + Depends
- + Conflicts
-
- * file: debian/python*.*
- Change name of "python-*.*" to "python3-*.*"
- And change python*.install to the right place:
-
- e.g.
- + For python2.7 -> usr/lib/python2.7/dist-packages/
- + For python3.4 -> usr/lib/python3/dist-packages/
-
- * file: cmake files
- May need to hack some CMake files to let it pass the build.
-
- Then do the custom build as said above.
+ 5. Grab some image datasets and deep network prototxt and have fun.
Footnotes
=========
@@ -144,16 +90,9 @@
as all function of caffe-cpu can be provided by caffe-cuda,
which means functions caffe-cpu provided are a subset of
those provided by caffe-cuda.
- Since CUDA is only available on "amd64" and "i386", caffe-cpu
- is created.
-
-[2] This should work Debian (at least Debian), Ubuntu, and etc...
- but you may have to give up when you are running non-dpkg-based OS.
-
-[3] After package Caffe is accepted into Debian Archive
-[4] Make sure to firstly install libcaffe-* which include libcaffe.so.0,
- the true shared object file of caffe.
+[2] Make sure to firstly install libcaffe-* which include libcaffe.so.*,
+ the true shared object file of caffe. i.e. please install in order.
[A]
- -- Zhou Mo <cdluminate at gmail.com> Wed, 02 Sep 2015 07:04:53 +0000
+ -- Zhou Mo <cdluminate at gmail.com> Wed, 09 Mar 2016 00:00:00 +0000
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe-contrib.git
More information about the debian-science-commits
mailing list