1,安裝centos 7.8環(huán)境
2,安裝php寶塔環(huán)境
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
3,安裝python3環(huán)境
參考:安裝python3.6.5
4,安裝ffmepg環(huán)境
安裝源:yum install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
安裝:yum install ffmpeg ffmpeg-devel -y
下載安裝包:wget https://johnvansickle.com/ffmpeg/release-source/ffmpeg-4.1.tar.xz
解壓:tar xvJf ffmpeg-4.1.tar.xz
進(jìn)入目錄:cd ffmpeg-4.1
需要安裝yasm的匯編編譯器:yum install yasm -y
需要安裝yasm的匯編編譯器:yum install yasm -y
編譯:./configure --prefix=/etc/ffmpeg
安裝:make && make install
配置環(huán)境變量:vim /etc/profile
----------------------------------------------------------------
#set ffmpeg environment
PATH=$PATH:/usr/local/ffmpeg/bin
export PATH
---------------------------------------------------
source /etc/profile #使配置生效
source /etc/profile #使配置生效
查看版本:ffmpeg -version
----------------------------------------------------------------
方式2:
4,安裝顯卡驅(qū)動(dòng)----------------------------------------------------------------
方式2:
5,安裝CUDA 10.0
檢查是否安裝了GPU:lspci | grep -i nvidia
安裝gcc、g++編譯器:sudo yum install gcc sudo yum install gcc-c++
安裝kernel-devel:sudo yum install kernel-devel
安裝CUDA Driver,Toolkit和Samples:sudo sh cuda_9.0.176_384.81_linux-run.run
在用戶根目錄下的.bashrc文件中加入如下內(nèi)容:
export PATH=$PATH:/usr/local/cuda-9.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
source .bashrc (立即生效文件)
如果是全環(huán)境變量(所用用戶都能使用),需要在/etc/profile文件加入上面的幾句話
6,安裝 cudnn 7.4.2 tar -xzvf cudnn-10.0-linux-x64-v7.1.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda-10.0/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.0/lib64
修改文件權(quán)限sudo cp cuda/include/cudnn.h /usr/local/cuda-10.0/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-10.0/lib64
sudo chmod a+r /usr/local/cuda-9.0/include/cudnn.h /usr/local/cuda-9.0/lib64/libcudnn*
7,安裝tensorflow 2.4 環(huán)境
pip3 install tensorflow==2.4
如果提示pip3版本低,則升級(jí)pip3版本:
如果提示pip3版本低,則升級(jí)pip3版本:
pip3 install --upgrade pip
pip install opencv-python
pip install scipy
pip install pillow
pip install flask
以上就是“AI盒子環(huán)境部署流程”的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注木子天禾科技其它相關(guān)文章!