笔记:ubuntu 14.04/16.04(linux)下离线批量安装依赖库,caffe,cuda8.0

前端之家收集整理的这篇文章主要介绍了笔记:ubuntu 14.04/16.04(linux)下离线批量安装依赖库,caffe,cuda8.0前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

笔记:ubuntu 14.04/16.04(linux) 下离线安装依赖库,caffe,cuda8.0


apt-get 批量下载与安装

批量下载:

apt-get install -d --reinstall libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler

下载包目录
/var/cache/apt/archives 可以拷贝到指定文件夹Desktop/packages


批量安装:

sudo dpkg -i -R $base_dir/Desktop/packages/
or
sudo dpkg -i -R *.deb


pip 批量下载与安装

批量下载:

pip install --download /home/bidlc/Desktop/caffeonline/packages -r /home/bidlc/Desktop/caffeonline/requirements.txt --trusted-host pypi.douban.com -i http://pypi.douban.com/simple
or
pip install tensorflow --download /home/bidlc/Desktop/ddd --trusted-host pypi.douban.com -i http://pypi.douban.com/simple


批量安装:

pip install --no-index --find-links=/home/bidlc/Desktop/caffeonline/packages -r /home/bidlc/Desktop/caffeonline/requirements.txt
or
pip install ./packages/*.whl


16.04下安装caffe的批处理代码(因为要重启所以分三部分,所有包均已下好)

1.sh

#!/bin/sh
base_dir=`pwd`
echo $base_dir
sudo dpkg -i -R $base_dir/offline-install-caffe-and-opencv/install/caffeku/
sudo dpkg -i -R $base_dir/offline-install-caffe-and-opencv/install/1cudaku/
sudo dpkg -i $base_dir/cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo dpkg -i -R $base_dir/offline-install-caffe-and-opencv/install/2cudaku/
sudo apt-get install cuda
sudo reboot

2.txt

sudo gedit /etc/profile
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
source /etc/profile

3.sh

#!/bin/sh base_dir=`pwd` echo $base_dir tar -xvf $base_dir/offline-install-caffe-and-opencv/anzhaungbao/cudnn-8.0-linux-x64-v6.0.tgz sudo cp $base_dir/cuda/include/cudnn.h /usr/local/cuda/include sudo cp -a $base_dir/cuda/lib64/libcudnn* /usr/local/cuda/lib64 sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.6.0.21 /usr/local/cuda/lib64/libcudnn.so.6 sudo ln -sf /usr/local/cuda/lib64/libcudnn.so.6 /usr/local/cuda/lib64/libcudnn.so sudo ldconfig sudo python $base_dir/offline-install-caffe-and-opencv/pip-intall/pip-9.0.1/setup.py install sudo pip install --no-index --find-links=$base_dir/offline-install-caffe-and-opencv/pip/packages -r $base_dir/offline-install-caffe-and-opencv/pip/requirements.txt cd $base_dir/caffe-ssd make all -j64 && make py -j64

原文链接:https://www.f2er.com/ubuntu/351741.html

猜你在找的Ubuntu相关文章