ubuntu 安装HDF5 ,torch-hdf5,loadcaffe等

1.安装hdf5
下载hdf5-1.8.18.tar.gz
tar -xzf hdf5-1.8.18.tar.gz
cd hdf5-1.8.18
根据cmake_patch.txt中的说明,将hdf5-1.8.18中CMakeLists.txt的第887行的Using改为USING
mkdir build
cd build
sudo cmake ..
sudo make
sudo make install (这一步可以让系统安装hdf5的库)
2.安装torch-hdf5

Ubuntu < 13.04
sudo apt-get install libhdf5-serial-dev hdf5-tools
git clone https://github.com/deepmind/torch-hdf5
cd torch-hdf5
sudo luarocks make hdf5-0-0.rockspec

Ubuntu >= 13.04
sudo apt-get install libhdf5-serial-dev hdf5-tools
git clone https://github.com/deepmind/torch-hdf5
cd torch-hdf5
sudo luarocks make hdf5-0-0.rockspec LIBHDF5_LIBDIR=”/usr/lib/x86_64-linux-gnu/”

3.lua-cjson安装
git clone https://github.com/mpx/lua-cjson.git
cd lua-cjson
可能需要修改Makefile文件的LUA_INCLUDE_DIR,这是Torch的安装目录,我的是/usr/local/torch7
make
make install

4. loadcaffe安装
git clone https://github.com/szagoruyko/loadcaffe.git
cd loadcaffe
sudo apt-get install libprotobuf-dev protobuf-compiler
luarocks install loadcaffe
5. iTorch安装
iTorch安装之前可能需要安装ZeroMQ,我安装的是4.1.x
git clone https://github.com/zeromq/zeromq4-1.git
mkdir build-zeromq
cd build-zeromq
cmake ..
make && make install
安装完之后,luarocks install itorch
之后可以通过luarocks list查看是否安装成功

你可能感兴趣的:(Tools)