# 查看N卡GPU的配置 nvidia-smi # 查看N卡的圖形界面配置 nvidia-settings # 命令:查看nvidia卡型號; $ lspci | grep -i nvidia # 返回內容: 01:00.0 VGA compatible controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2) A.執行cuda9.X的run安裝文件出現問(wèn)題 Error: unsupported compiler: 7.3.0. Use --override to override this check. sudo sh ./cuda_9.1.85_387.26_linux.run --override //添加這個(gè)參數來(lái)屏蔽這個(gè)報錯! 于是可以繼續安裝了! 看到如下結果,基本OK.= Summary ============Driver: Not SelectedToolkit: Installed in /usr/local/cuda-9.1Samples: Installed in /home/ya/cuda9-samplesPlease make sure that - PATH includes /usr/local/cuda-9.1/bin - LD_LIBRARY_PATH includes /usr/local/cuda-9.1/lib64, or, add /usr/local/cuda-9.1/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.1/binPlease see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.1/doc/pdf for detailed information on setting up CUDA.WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 384.00 is required for CUDA 9.1 functionality to work.To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file: sudo <CudaInstaller>.run -silent -driverLogfile is /tmp/cuda_install_13322.logSignal caught, cleaning up--------------------- B 設定配置(參照上面提示)$ sudo vim /etc/profile在打開(kāi)的文件末尾,添加以下兩行。64位系統:$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} 32位系統:$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} C 安裝完畢CUDA9.x,還需安裝如下libsudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev D 最后reboot,并用如下命令測試,看是否安裝CUDA9.X正確$ nvcc -Vnvcc: NVIDIA (R) Cuda compiler driverCopyright (c) 2005-2017 NVIDIA CorporationBuilt on Fri_Nov__3_21:07:56_CDT_2017Cuda compilation tools, release 9.1, V9.1.85測試Box2D物理引擎是通過(guò)激活如下的小游戲CartPole:用如下命令來(lái)測試Box2D是否安裝成功,如果失敗,只會(huì )出現白框,而沒(méi)有桿子!python //進(jìn)入python,最好是PY3import gym //load gym庫,這里不能有報錯env = gym.make("CartPole-v0") //新建一個(gè)樹(shù)立桿子的游戲環(huán)境env.reset() //初始化env.render() //渲染,此時(shí)會(huì )彈出dialog,里面有桿子!就算OK了!env.close() //關(guān)閉env環(huán)境,dialog不能被gui關(guān)閉,只能用本行命令關(guān)閉!測試:python //進(jìn)入python,最好是PY3import gym //load gym庫,這里不能有報錯env = gym.make("SpaceInvaders-v0") //新建一個(gè)打飛機游戲環(huán)境(這里可能會(huì )報錯如下!!!)env.reset() //初始化env.render() //渲染,此時(shí)會(huì )彈出dialog,里面有飛機!就算OK了!env.close() //關(guān)閉env環(huán)境,dialog不能被gui關(guān)閉,只能用本行命令關(guān)閉!請參考持續收集的項目computer-using-hints, 及源碼
命令:
# 如下命令用來(lái)定義2種pythonsudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150# 如下命令用來(lái)切換sudo update-alternatives --config python 安裝指導:https://jingyan.baidu.com/article/359911f5a5b74857fe0306c4.html 首先看看自己的Ubuntu是不是已經(jīng)安裝或啟用了ssh服務(wù),執行ps -e |grep ssh 如果只有ssh-agent 這個(gè)是ssh-client客戶(hù)端服務(wù),如果沒(méi)有sshd,繼續如下安裝ssh-server 安裝sshd: sudo apt install openssh-server 手動(dòng)操作開(kāi)啟/關(guān)閉ssh服務(wù)相關(guān)命令: sudo service ssh start #手動(dòng)啟動(dòng)服務(wù) sudo service ssh stop #手動(dòng)關(guān)閉服務(wù) sudo service ssh status #查詢(xún)服務(wù)狀態(tài)聯(lián)系客服