Cov txheej txheem:

Tsim Docker Duab rau Raspberry Pi: 7 Kauj Ruam
Tsim Docker Duab rau Raspberry Pi: 7 Kauj Ruam

Video: Tsim Docker Duab rau Raspberry Pi: 7 Kauj Ruam

Video: Tsim Docker Duab rau Raspberry Pi: 7 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Tsim Docker Duab rau Raspberry Pi
Tsim Docker Duab rau Raspberry Pi

Cov lus qhia no qhia yuav ua li cas tsim Docker Duab rau Raspberry Pi.

Kauj Ruam 1: Vim Li Cas Docker?

Koj tuaj yeem siv Raspberry Pi (RPi) ua ntau yam, lub vev xaib me me, AI pab, Robotics … thiab lwm yam.

Ntau txoj haujlwm koj xav sim, tab sis cov ntsiab lus mob yog:

Lub Sijhawm Ua

RPi tsis mob siab rau ua lub zog, thiab SD/USB tsav txwv IO nrawm. Siv apt nruab txhua pob kev vam khom xav tau ib teev thiab tsim lub hauv paus xav tau ntau teev. Tshwj xeeb tshaj yog rau AI cov haujlwm uas muaj feem cuam tshuam, lub sijhawm tos ntau dua sijhawm los sim.

Version Tsis sib haum

Txhua tus sim ntau txoj haujlwm hauv ib RPi. Thaum koj tau sim ib qhov haujlwm thiab xav hloov mus rau lwm qhov, koj yuav pom qee qhov kev ua tsis tiav los ntawm kev vam khom tsev qiv ntawv version tsis sib haum nrog txoj haujlwm yav dhau los. Qee lub tsev qiv ntawv tsis tsim ob peb xyoos dhau los thiab vam khom qee lub tsev qiv ntawv qub heev. Hauv kev sib piv, txoj haujlwm nquag nyob ntawm cov tsev qiv ntawv tshiab. Ob txoj haujlwm tsis tuaj yeem sib koom ua ke hauv tib lub SD/USB tsav?.

Duab thaub qab

Txij li qee qhov haujlwm tsis tuaj yeem sib koom ua ke, tsuas yog yuav ntau SD/USB tsav kom khaws txhua qhov phiaj xwm duab nyob yog txoj hauv kev. Yog nyiaj tsis txwv ?. Tab sis nws nce qhov nyuaj ntawm kev tswj cov ntaub ntawv/duab, qee zaum koj xav tau sib pauv SD/USB thiab khau raj ntau zaus kom paub seb koj xav tau dab tsi.

Nyuaj rau Qhia

Thaum koj tsim koj txoj haujlwm thiab xav qhia qhov chaw rau cov phooj ywg, koj cov phooj ywg yuav tau txais kev tsim ua tsis tiav rov qab. Kev faib tawm/tsev qiv ntawv qub dhau los lossis tshiab dhau, tsim cov qauv thiab qee qhov kev dag. Koj yuav tsum siv sijhawm los daws teeb meem rau lwm tus tab sis tsis txhawb nqa txoj haujlwm nws tus kheej.

Cov tsos mob saum toj no yog kuv qhov kev paub hauv ob peb xyoos no. Docker tuaj yeem pab nws feem ntau.

Docker pib tsim los ntawm xaiv cov duab ua niam ua txiv ua ntej. Piv txwv li debian: jessie-slim pib los ntawm qhov qub ruaj khov Debian lub teeb yuag faib; ntawm: 10-buster-slim pib los ntawm Debian lub teeb yuag faib nrog Node.js 10 teeb tsa. Cov duab ua ntej yuav txuag tau ntau lub sijhawm rau nyem duab, tau hloov tshiab thiab teeb tsa cov tsev qiv ntawv vam khom. Txhua qhov haujlwm tuaj yeem pib los ntawm OS txawv sib txawv, version ua haujlwm thiab cov tsev qiv ntawv. Thaum koj ua tiav txhim kho koj tus kheej txoj haujlwm, koj tuaj yeem thawb Docker duab rau docker hub thiab qhia rau txhua tus. Koj tuaj yeem khaws txhua qhov ntaub ntawv phiaj xwm tib yam SD/USB (cov ntaub ntawv yuav tsum tau thaub qab tas mus li rau lwm yam xov xwm). Txhawm rau txuag kev khaws cia hauv zos, koj tseem tuaj yeem ntxuav Docker duab thaum tsis siv, txhua lub sijhawm koj tuaj yeem rub los ntawm Docker hub dua.

Kauj ruam 2: Docker Nyiaj Siv Ua Haujlwm

Docker ntxiv ib txheej virtualize, nyiaj siv ua haujlwm yog kev txhawj xeeb. Kuv tsis tau sim ntau dhau txog Docker nyiaj siv ua haujlwm. Feem ntau cov txiaj ntsig Googled thov qis heev thiab kuv pom daim ntawv no hais txog qee qhov kev tshawb fawb ntsig txog:

domino.research.ibm.com/library/cyberdig.n…

Kauj ruam 3: Nruab Docker

Cias khiav:

curl -sSL https://get.docker.com | sh ua

Ref.: Yog

www.raspberrypi.org/blog/docker-comes-to-…

docs.docker.com/get-started/

Kauj Ruam 4: Tsim Docker Duab

Thov nrhiav cov ntawv qhia ua haujlwm ntawm kev tsim cov duab docker:

docs.docker.com/get-started/part2/

Kuv muaj 2 txoj haujlwm siv Docker, koj yuav pom Dockerfile ua qhov siv:

BanateCAD xav kom Lua runtime thiab qee qhov ntxiv Lua cov tsev qiv ntawv. Tsuas yog Lua 5.1 tuaj yeem siv tau rau txhua qhov xav tau Lua cov tsev qiv ntawv tab sis nws yog cov khoom lag luam xyoo 2006. Qhov tseeb Debian faib uas tuaj yeem tsim Lua 5.1 ua tiav yog Jessie (Cov ntawv ua ntej Debian qub ruaj khov tam sim no). Yog li kuv tau tsim Lua 5.1 ib puag ncig Docker Duab los ua haujlwm

github.com/moononournation/BanateCAD/tree/…

OpenCV yog txoj haujlwm tsim kho tshiab, qhov chaws nyob ntawm cov tsev qiv ntawv tshiab thiab muab tso ua ke. Yog li nws muaj txoj hauv kev zoo los ua tsis tau tiav, lub tsev qiv ntawv txheej txheem kos npe, suav nrog version, kev tsis sib haum xeeb … Kuv xav siv opencv4nodejs los ua ib qho app yooj yim thiab tsis tas yuav tsum muaj cov yam ntxwv tshiab. Yog li thaum kuv pom txoj hauv kev los tsim opencv4nodejs ua tiav, Kuv xav khov nws mus rau Docker Duab thiab ua kuv daim ntawv thov tiag tiag coding

github.com/moononournation/face-aware-phot…

Kauj Ruam 5: Txhim Kho Kev Tsim Vs Vs Duab Loj

Kev Txhim Kho Kev Tsim Vs Vs Duab Loj
Kev Txhim Kho Kev Tsim Vs Vs Duab Loj
Kev Txhim Kho Kev Tsim Vs Vs Duab Loj
Kev Txhim Kho Kev Tsim Vs Vs Duab Loj

Koj tuaj yeem pom kuv lub ntsej muag-paub-yees duab-osd project muaj 2 qhov hloov tshiab ntawm Dockfile:

github.com/moononournation/face-aware-phot…

Thaum kev txhim kho, Kuv nyiam cais RUN hais kom ua me me li sai tau thiab npaj feem ntau yuav hloov RUN hais kom mus rau kauj ruam kawg. Yog li rau txhua qhov kev tsim rau kev hloov pauv hloov pauv, Kuv tuaj yeem siv txheej txheej yav dhau los kom ntau li ntau tau thiab txuag tau ntau qhov nrawm.

Hauv qhov sib piv, Kuv yuav suav tag nrho RUN cov lus txib hauv ib qho ua ntej tso tawm. txheej qis dua tuaj yeem txo qis Docker Duab loj. Kuv lub ntsej muag-paub-yees duab-osd qhov piv txwv nws tuaj yeem txo ntau dua 100 MB hauv qhov loj me.

Kauj Ruam 6: Ntau Duab Duab

Ntau Duab Duab
Ntau Duab Duab

Raws li tau hais ua ntej, RPi tsis mob siab rau ua lub zog. Siv RPi tsim Docker duab yuav tsis yog qhov kev xaiv zoo, tshwj xeeb tshaj yog thaum koj tsuas yog RPi tab tom ua lwm txoj haujlwm.

Siv lub khoos phis tawj x86 kuj tseem tuaj yeem pab koj tsim Docker Duab, thov nrhiav cov ntsiab lus ntxiv ntawm no:

www.docker.com/blog/multi-arch-images/

yooj yim 2 cov lus txib tuaj yeem tsim x86 thiab ARM Docker Duab ua ke:

docker buildx tsim -siv

docker buildx tsim --platform linux/amd64, linux/arm -t moononournation/debian-imagemagick-lua-meshlab: 1.0.1 --push.

Multi Arch tuaj yeem tsim ntau lub platform duab nrog tib Docker duab cim, yog li koj txoj haujlwm tuaj yeem ua haujlwm hauv tshuab sib txawv. xws li

docker run -it moononournation/debian-imagemagick-lua-meshlab: 1.0.1

Tsis muaj teeb meem koj ua cov lus txib saum toj no ntawm RPi lossis koj lub computer x86, koj tuaj yeem tau txais Lua qhov chaw ua haujlwm.

Kauj Ruam 7: Zoo siab RPi

Tam sim no koj tuaj yeem txhim kho thiab qhia koj li RPi qhov haujlwm yooj yim dua!

Pom zoo: