深度學(xué)習(xí)環(huán)境搭建 - 2 docker+deepo+jupyter

過年機(jī)器還有些沒發(fā)貨,先在筆記本上演練下裝環(huán)境。

肯定是docker+deepo+jupyter+wing ide組合了。各種優(yōu)點不說了,重點是不折騰+隨時隨地折騰。

win10 home + docker

docker for windows要求win pro以上。家庭版不支持hyper-v。docker-toolbox我是拒絕的,性能差??!于是參照這篇文章,操作如下:
1,新建cmd腳本,開啟hyper-v component:
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
pause

2,新建cmd腳本,開啟hyper-v containers:
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*containers*.mum >containers.txt
for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del containers.txt
Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
pause

3,重啟電腦

4,改注冊表\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion :
EditionID鍵值改為 Professional

5,安裝docker for windows(最新的好像不行),官網(wǎng)很慢我下載的這個里面的Docker Windows 18.06.1-ce-win73。

6,搞定。

deepo

著名的image,筆記本不支持cuda,所以我裝的tag是:py36-jupyter-cpu。

啟動命令:docker run -it -p 8888:8888 ufoym/deepo:py36-jupyter-cpu jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'

瀏覽器鏈接http://localhost:8888搞定。

網(wǎng)頁上新開terminal,安裝jupyter插件:
pip install jupyter_contrib_nbextensions
pip install jupyter_nbextensions_configurator
jupyter contrib nbextension install --user
jupyter nbextension enable execute_time/ExecuteTime
pip install ipywidgets
pip install qgrid
pip install RISE
jupyter-nbextension install rise --py --sys-prefix
jupyter-nbextension enable rise --py --sys-prefix

重啟jupyter,網(wǎng)頁上多了個Nbextensions標(biāo)簽頁,在這個頁面里,啟用各種插件

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容