caffe搭建--opensuse13.2上搭建caffe开发环境
第一部分:参考一下内容。将sudo 替换成zypper即可。
--------------------------------------------这部分参照以下官网内容-------------------------------------------------------------------------------
RHEL / Fedora / CentOS Installation
General dependencies
sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
Remaining dependencies, recent OS
sudo yum install gflags-devel glog-devel lmdb-devel
Remaining dependencies, if not found
# glog wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz tar zxvf glog-0.3.3.tar.gz cd glog-0.3.3 ./configure make && make install # gflags wget https://github.com/schuhschuh/gflags/archive/master.zip unzip master.zip cd gflags-master mkdir build && cd build export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 make && make install # lmdb git clone https://github.com/LMDB/lmdb cd lmdb/libraries/liblmdb make && make install
Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first.
CUDA: Install via the NVIDIA package instead of yum
to be certain of the library and driver versions. Install the library and latest driver separately; the driver bundled with the library is usually out-of-date. + CentOS/RHEL/Fedora:
BLAS: install ATLAS by sudo yum install atlas-devel
or install OpenBLAS or MKL for better CPU performance. For the Makefile build, uncomment and set BLAS_LIB
accordingly as ATLAS is usually installed under /usr/lib[64]/atlas
).
Python (optional): if you use the default Python you will need to sudo yum install
the python-devel
package to have the Python headers for building the pycaffe wrapper.
Continue with compilation.
-------------------------------------------------------注意事项-------------------------------------------------------------------
问题1: numpy开发包可能会缺少,也就是没有头文件
sudo zypper install python-numpy-devel 这个以外的给力了。 在ubuntu和fedora上都没有这个情况的。
问题2: gflags 需要手动下载安装。即不能使用zypper大法。
---------------------------------------------附件:部分细节------------
完全按照第一部分是不行的。有些包需要有些名称上或其他的安装的变化。
sudo zypper install python-numpy-devel
sudo zypper install leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
sudo zypper install atlas-devel
sudo zypper install atlas* 点N
sudo zypper install *atlas* 点N
sudo zypper install python python-devel python-numpy python-scipy python-sklearn 其中sklearn不能装
wget https://github.com/schuhschuh/gflags/archive/master.zip
sudo zypper install protobuf-devel
sudo zypper install glog-devel lmdb-devel
------------------------------------又附结果:----------------------------------
[100%] Built target classification
[100%] Built target convert_cifar_data
[100%] Built target convert_mnist_data
[100%] Built target convert_mnist_siamese_data
[100%] Building CXX object python/CMakeFiles/pycaffe.dir/caffe/_caffe.cpp.o
Linking CXX shared library ../lib/_caffe.so
Creating symlink /home/sea/caffe-master/python/caffe/_caffe.so -> /home/sea/caffe-master/build/lib/_caffe.so
[100%] Built target pycaffe
-- Installing: /home/sea/caffe-master/build/install/python/caffe/io.py
-- Installing: /home/sea/caffe-master/build/install/python/caffe/net_spec.py
-- Installing: /home/sea/caffe-master/build/install/python/caffe/pycaffe.py
-- Installing: /home/sea/caffe-master/build/install/python/caffe/proto
-- Installing: /home/sea/caffe-master/build/install/python/caffe/proto/__init__.py
-- Installing: /home/sea/caffe-master/build/install/python/caffe/proto/caffe_pb2.py
-- Installing: /home/sea/caffe-master/build/install/python/caffe/_caffe.so
-- Set runtime path of "/home/sea/caffe-master/build/install/python/caffe/_caffe.so" to "/home/sea/caffe-master/build/install/lib:/usr/local/cuda/lib64"
sea@linux-61bx:~/caffe-master/build> ls
每一个不曾起舞的日子,都是对生命的辜负。
But it is the same with man as with the tree. The more he seeks to rise into the height and light, the more vigorously do his roots struggle earthward, downward, into the dark, the deep - into evil.
其实人跟树是一样的,越是向往高处的阳光,它的根就越要伸向黑暗的地底。----尼采
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 25岁的心里话