Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install and Run Docker on Google Coral Dev Board #32

Closed
adr-arroyo opened this issue Jun 25, 2019 · 14 comments
Closed

Install and Run Docker on Google Coral Dev Board #32

adr-arroyo opened this issue Jun 25, 2019 · 14 comments
Labels
DevBoard Related to the dev board

Comments

@adr-arroyo
Copy link

Hello,

I would like to install docker in the Google Coral Dev board. Official support says that they have not tried to do it, but "I can try to do it".

Anyway, there is no "official" or supported way to install docker in the board, mainly because the get.docker.com script does not work on the coral.

Has anyone tried to install it by source? Following the official steps. The first problem is the iptables command, it is not in the coral SO.

Cheers

@adr-arroyo
Copy link
Author

Update:

This might sound weird. Even though we cannot get docker from the website. It is completely possible to run docker from the Coral Dev Board.

Just follow the steps in the official tutorial for getting Docker CE from binaries here. You need to run:

$ wget https://download.docker.com/linux/static/stable/armhf/docker-18.09.6.tgz 

To get the compatible arm version of docker. If you follow the rest of the tutorial, you should have docker running on your dev board.

It is highly probable that you need to run sudo dockerd & (docker daemon) every time you restart the coral. In addition, you might want to follow post-installation steps for running docker without sudo.

Cheers!

@mmortazavi
Copy link

I am struggling to make up and running. From @adr-arroyo recommendation I managed to install the docker successfully on the board, and hello-world works too. In my case I am trying to run the gcr.io/automl-vision-ondevice/gcloud-container-1.12.0 (see here) on the board for my custom object detection model. Everything works fine on my local machine, but docker run based on the above mentioned link like:

sudo docker run --rm --name ${CONTAINER_NAME} -p ${PORT}:8501 -v ${YOUR_MODEL_PATH}:/tmp/mounted_model/0001 -t ${CPU_DOCKER_GCS_PATH}

Keeps returning strange errors (in DEBU mode):

errored_model/0001 -t gcr.io/automl-vision-ondevice/gcloud-container-1.12.0
DEBU[2019-11-13T16:56:26.798785994Z] Calling GET /_ping
DEBU[2019-11-13T16:56:26.802488484Z] Calling POST /v1.39/containers/create?name=tf-serving_datamatrix
DEBU[2019-11-13T16:56:26.803478967Z] form data: {"AttachStderr":true,"AttachStdin":false,"AttachStdout":true,"Cmd":null,"Domainname":"","Entrypoint":null,"Env":[],"ExposedPorts":{"8501/tcp":{}},"HostConfig":{"AutoRemove":true,"Binds":["/home/mendel/datamatrix-serving-gcp/asset:/tmp/mounted_model/0001"],"BlkioDeviceReadBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceWriteIOps":null,"BlkioWeight":0,"BlkioWeightDevice":[],"CapAdd":null,"CapDrop":null,"Cgroup":"","CgroupParent":"","ConsoleSize":[0,0],"ContainerIDFile":"","CpuCount":0,"CpuPercent":0,"CpuPeriod":0,"CpuQuota":0,"CpuRealtimePeriod":0,"CpuRealtimeRuntime":0,"CpuShares":0,"CpusetCpus":"","CpusetMems":"","DeviceCgroupRules":null,"Devices":[],"DiskQuota":0,"Dns":[],"DnsOptions":[],"DnsSearch":[],"ExtraHosts":null,"GroupAdd":null,"IOMaximumBandwidth":0,"IOMaximumIOps":0,"IpcMode":"","Isolation":"","KernelMemory":0,"Links":null,"LogConfig":{"Config":{},"Type":""},"MaskedPaths":null,"Memory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"NanoCpus":0,"Networ[ 2686.209220] docker0: port 1(veth4740dd6) entered blocking state
kMode":"default","OomKillDisable"[ 2686.217511] docker0: port 1(veth4740dd6) entered disabled state
:false,"OomScoreAdj":0,"PidMode":[ 2686.227186] device veth4740dd6 entered promiscuous mode
"","PidsLimit":0,"PortBindings":{"8501/tcp":[{"HostIp":"","HostPo[ 2686.239157] IPv6: ADDRCONF(NETDEV_UP): veth4740dd6: link is not ready
rt":"8501"}]},"Privileged":false,"PublishAllPorts":false,"ReadonlyPaths":null,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":"no"},"SecurityOpt":null,"ShmSize":0,"UTSMode":"","Ulimits":null,"UsernsMode":"","VolumeDriver":"","VolumesFrom":null},"Hostname":"","Image":"gcr.io/automl-vision-ondevice/gcloud-container-1.12.0","Labels":{},"NetworkingConfig":{"EndpointsConfig":{}},"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"Tty":true,"User":"","Volumes":{},"WorkingDir":""}
DEBU[2019-11-13T16:56:26.849447978Z] container mounted via layerStore: &{/var/lib/docker/overlay2/404baa115bb65d34ef72de7ff8cb457f226dcb1b9c4aa091b5d8c338e7880943/merged 0xaaaab56b1f00 0xaaaab56b1f00}
DEBU[2019-11-13T16:56:26.889159331Z] Calling POST /v1.39/containers/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584/attach?stderr=1&stdout=1&stream=1
DEBU[2019-11-13T16:56:26.889558692Z] attach: stdout: begin
DEBU[2019-11-13T16:56:26.889629732Z] attach: stderr: begin
DEBU[2019-11-13T16:56:26.891183977Z] Calling POST /v1.39/containers/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584/wait?condition=removed
DEBU[2019-11-13T16:56:26.893797824Z] Calling POST /v1.39/containers/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584/start
DEBU[2019-11-13T16:56:26.900843164Z] container mounted via layerStore: &{/var/lib/docker/overlay2/404baa115bb65d34ef72de7ff8cb457f226dcb1b9c4aa091b5d8c338e7880943/merged 0xaaaab56b1f00 0xaaaab56b1f00}
DEBU[2019-11-13T16:56:26.901884767Z] Assigning addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T16:56:26.901957847Z] RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])
DEBU[2019-11-13T16:56:26.902039927Z] Request address PoolID:172.17.0.0/16 App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65533, Sequence: (0xc0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3 Serial:false PrefAddress:<nil>
DEBU[2019-11-13T16:56:26.957860006Z] Assigning addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T16:56:26.970535882Z] Programming external connectivity on endpoint tf-serving_datamatrix (67a977d6e6912139fb5cafb74c3ca18abc1c63b8153e077982568c0fe4f4cd0d)
DEBU[2019-11-13T16:56:26.970758123Z] /sbin/iptables, [--wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T16:56:26.983726080Z] /sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T16:56:26.997187478Z] /sbin/iptables, [--wait -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T16:56:27.012740602Z] /sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T16:56:27.026378641Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T16:56:27.039449798Z] /sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T16:56:27.073848135Z] EnableService ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584 START
DEBU[2019-11-13T16:56:27.073922415Z] EnableService ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584 DONE
DEBU[2019-11-13T16:56:27.088349816Z] bundle dir created                            bundle=/var/run/docker/containerd/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584 module=libcontainerd namespace=moby root=/var/lib/docker/overlay2/404baa115bb65d34ef72de7ff8cb457f226dcb1b9c4aa091b5d8c338e7880943/merged
[ 2686.925729] eth0: renamed from vethef53a0d
[ 2686.946474] IPv6: ADDRCONF(NETDEV_CHANGE): veth4740dd6: link becomes ready
[ 2686.953678] docker0: port 1(veth4740dd6) entered blocking state
[ 2686.959663] docker0: port 1(veth4740dd6) entered forwarding state
DEBU[2019-11-13T16:56:27.672190827Z] sandbox set key processing took 240.51044ms for container ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584
DEBU[2019-11-13T16:56:27.808139451Z] event                                         module=libcontainerd namespace=moby topic=/tasks/create
standard_init_linux.go:211: exec user process caused "exec format error"
DEBU[2019-11-13T16:56:27.916106996Z] event                                         module=libcontainerd namespace=moby topic=/tasks/start
DEBU[2019-11-13T16:56:27.980031777Z] Calling POST /v1.39/containers/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584/resize?h=24&w=80
DEBU[2019-11-13T16:56:27.982620185Z] FIXME: Got an API for which error does not match any expected type!!!: unknown
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
        /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:39
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
        <autogenerated>:1
github.com/docker/docker/builder/builder-next.init
        <autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
        <autogenerated>:1
main.init
        <autogenerated>:1
runtime.main
        /usr/local/go/src/runtime/proc.go:186
runtime.goexit
        /usr/local/go/src/runtime/asm_arm64.s:1037  error_type="*errors.fundamental" module=api
ERRO[2019-11-13T16:56:27.982772825Z] Handler for POST /v1.39/containers/ceb1b2220684126fc29047f71eff19e82a6005ce97f493baee1ae5b9bd3b6584/resize returned error: bad file descriptor: unknown
DEBU[2019-11-13T16:56:27.983097306Z] FIXME: Got an API for which error does not match any expected type!!!: unknown
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
        /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:39
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
        <autogenerated>:1
github.com/docker/docker/builder/builder-next.init
        <autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
        <autogenerated>:1
main.init
        <autogenerated>:1
runtime.main
        /usr/local/go/src/runtime/proc.go:186
runtime.goexit
        /usr/local/go/src/runtime/asm_arm64.s:1037  error_type="*errors.fundamental" module=api
DEBU[2019-11-13T16:56:28.025367425Z] event                                         module=libcontainerd namespace=moby topic=/tasks/exit
DEBU[2019-11-13T16:56:28.113702434Z] attach: stdout: end
DEBU[2019-11-13T16:56:28.113729314Z] attach: stderr: end
DEBU[2019-11-13T16:56:28.113867674Z] attach done
DEBU[2019-11-13T16:56:28.114024515Z] event                                         module=libcontainerd namespace=moby topic=/tasks/delete
INFO[2019-11-13T16:56:28.114084635Z] ignoring event                                module=libcontainerd[ 2687.506455] docker0: port 1(veth4740dd6) entered disabled state
 namespace=moby top[ 2687.515858] vethef53a0d: renamed from eth0
ic=/tasks/delete type="*events.TaskDelete"
DEBU[2019-11-13T16:56:28.114708876Z] Revoking external connectivity on endpoint tf-serving_datamatrix (67a977d6e6912139fb5cafb74c3ca18abc1c63b8153e077982568c0fe4f4cd0d)
DEBU[2019-11-13T16:56:28.116608722Z] /sbin/iptables, [--wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T16:56:28.129940639Z] /sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T16:56[ 2687.574851] docker0: port 1(veth4740dd6) entered disabled state
:28.143010956Z] /sbin/iptables, [[ 2687.583338] device veth4740dd6 left promiscuous mode
--wait -t filter -C DOCKER ! -i d[ 2687.588875] docker0: port 1(veth4740dd6) entered disabled state
ocker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T16:56:28.155909792Z] /sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T16:56:28.169340350Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T16:56:28.184079752Z] /sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T16:56:28.351300342Z] Releasing addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T16:56:28.351394422Z] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)
DEBU[2019-11-13T16:56:28.351488622Z] Released address PoolID:LocalDefault/172.17.0.0/16, Address:172.17.0.2 Sequence:App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65532, Sequence: (0xe0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3
mendel@jumping-snail:~/datamatrix-serving-gcp$ clear
mounted_model/0001 -t gcr.io/automl-vision-ondevice/gcloud-container-1.12.0 tmp/m
DEBU[2019-11-13T17:02:45.191717089Z] Calling GET /_ping
DEBU[2019-11-13T17:02:45.195905000Z] Calling POST /v1.39/containers/create?name=tf-serving_datamatrix
DEBU[2019-11-13T17:02:45.197012489Z] form data: {"AttachStderr":true,"AttachStdin":false,"AttachStdout":true,"Cmd":null,"Domainname":"","Entrypoint":null,"Env":[],"ExposedPorts":{"8501/tcp":{}},"HostConfig":{"AutoRemove":true,"Binds":["/home/mendel/datamatrix-serving-gcp/asset:/tmp/mounted_model/0001"],"BlkioDeviceReadBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceWriteIOps":null,"BlkioWeight":0,"BlkioWeightDevice":[],"CapAdd":null,"CapDrop":null,"Cgroup":"","CgroupParent":"","ConsoleSize":[0,0],"ContainerIDFile":"","CpuCount":0,"CpuPercent":0,"CpuPeriod":0,"CpuQuota":0,"CpuRealtimePeriod":0,"CpuRealtimeRuntime":0,"CpuShares":0,"CpusetCpus":"","CpusetMems":"","DeviceCgroupRules":null,"Devices":[],"DiskQuota":0,"Dns":[],"DnsOptions":[],"DnsSearch":[],"ExtraHosts":null,"GroupAdd":null,"IOMaximumBandwidth":0,"IOMaximumIOps":0,"IpcMode":"","Isolation":"","KernelMemory":0,"Links":null,"LogConfig":{"Config":{},"Type":""},"MaskedPaths":null,"Memory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"NanoCpus":0,"NetworkMode":"default","OomKillDisable":false,"OomScoreAdj":0,"PidMode":[ 3064.607237] docker0: port 1(veth3939cbb) entered blocking state
"","PidsLimit":0,"PortBindings":{[ 3064.614934] docker0: port 1(veth3939cbb) entered disabled state
"8501/tcp":[{"HostIp":"","HostPor[ 3064.624672] device veth3939cbb entered promiscuous mode
t":"8501"}]},"Privileged":false,"[ 3064.632492] IPv6: ADDRCONF(NETDEV_UP): veth3939cbb: link is not ready
PublishAllPorts":false,"ReadonlyPaths":null,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":"no"},"SecurityOpt":null,"ShmSize":0,"UTSMode":"","Ulimits":null,"UsernsMode":"","VolumeDriver":"","VolumesFrom":null},"Hostname":"","Image":"gcr.io/automl-vision-ondevice/gcloud-container-1.12.0","Labels":{},"NetworkingConfig":{"EndpointsConfig":{}},"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"Tty":true,"User":"","Volumes":{},"WorkingDir":""}
DEBU[2019-11-13T17:02:45.252342628Z] container mounted via layerStore: &{/var/lib/docker/overlay2/6fdaa099da28835229bcf651b02a28736f15bf15422fecb0613cb46414a6b682/merged 0xaaaab56b1f00 0xaaaab56b1f00}
DEBU[2019-11-13T1^CDEBU[2019-11-13T17:02:45.403051289Z] /sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:02:45.413993691Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:02:45.423637324Z] /sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]

mendel@jumping-snail:~/datamatrix-serving-gcp$ DEBU[2019-11-13T17:02:45.454674719Z] EnableService f77e21e34f8a431442e0be46a62c361e35e4ba2391b1c36f5defcad42076b7fa START
DEBU[2019-11-13T17:02:45.454762440Z] EnableService f77e21e34f8a431442e0be46a62c361e35e4ba2391b1c36f5defcad42076b7fa DONE
DEBU[2019-11-13T17:02:45.464828956Z] bundle dir created                            bundle=/var/run/docker/containerd/f77e21e34f8a431442e0be46a62c361e35e4ba2391b1c36f5defcad42076b7fa module=libcontainerd namespace=moby root=/var/lib/docker/overlay2/6fdaa099da28835229bcf651b02a28736f15bf15422fecb0613cb46414a6b682/merged
[ 3065.310949] eth0: renamed from vethc7fb91e
[ 3065.332351] IPv6: ADDRCONF(NETDEV_CHANGE): veth3939cbb: link becomes ready
[ 3065.339442] docker0: port 1(veth3939cbb) entered blocking state
[ 3065.345433] docker0: port 1(veth3939cbb) entered forwarding state
DEBU[2019-11-13T17:02:46.060348703Z] sandbox set key processing took 256.205419ms for container f77e21e34f8a431442e0be46a62c361e35e4ba2391b1c36f5defcad42076b7fa
DEBU[2019-11-13T17:02:46.161962351Z] event                                         module=libcontainerd namespace=moby topic=/tasks/create
DEBU[2019-11-13T17:02:46.242607640Z] attach: stdout                                error="write unix /var/run/docker.sock->@: write: broken pipe"
DEBU[2019-11-13T17:02:46.242831082Z] attach: stdout: end
DEBU[2019-11-13T17:02:46.279123676Z] event                                         module=libcontainerd namespace=moby topic=/tasks/start
DEBU[2019-11-13T17:02:46.380514362Z] event                                         module=libcontainerd namespace=moby topic=/tasks/exit
DEBU[2019-11-13T17:02:46.455212407Z] event                                         module=libcontainerd namespace=moby topic=/tasks/delete
INFO[2019-11-13T17:02:46.455310328Z] ignoring event                                module=libcontainerd namespace=moby topic=/tasks/delete CDEBU[2019-11-13T17:02:46.486646644Z] /sbin/iptables, [--wait -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:02:46.498833936Z] /sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:02:46.510828387Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:02:46.524809093Z] /sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
[ 3065.844001] docker0: port 1(veth3939cbb) entered disabled state
[ 3065.850605] vethc7fb91e: renamed from eth0

mendel@jumping-snail:~/datamatrix-serving-gcp$ [ 3065.902300] docker0: port 1(veth3939cbb) entered disabled state
[ 3065.910609] device veth3939cbb left promiscuous mode
[ 3065.915694] docker0: port 1(veth3939cbb) entered disabled state
DEBU[2019-11-13T17:02:46.667830133Z] Releasing addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T17:02:46.667940054Z] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)
DEBU[2019-11-13T17:02:46.668052255Z] Released address PoolID:LocalDefault/172.17.0.0/16, Address:172.17.0.2 Sequence:App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65532, Sequence: (0xe0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3
^C
mendel@jumping-snail:~/datamatrix-serving-gcp$ ^C
mendel@jumping-snail:~/datamatrix-serving-gcp$ ^C
mendel@jumping-snail:~/datamatrix-serving-gcp$ ^C
mendel@jumping-snail:~/datamatrix-serving-gcp$ clear
mounted_model/0001 -t gcr.io/automl-vision-ondevice/gcloud-container-1.12.0 tmp/m
DEBU[2019-11-13T17:03:24.685144214Z] Calling GET /_ping
DEBU[2019-11-13T17:03:24.688552598Z] Calling POST /v1.39/containers/create?name=tf-serving_datamatrix
DEBU[2019-11-13T17:03:24.689658886Z] form data: {"AttachStderr":true,"AttachStdin":false,"AttachStdout":true,"Cmd":null,"Domainname":"","Entrypoint":null,"Env":[],"ExposedPorts":{"8501/tcp":{}},"HostConfig":{"AutoRemove":true,"Binds":["/home/mendel/datamatrix-serving-gcp/asset:/tmp/mounted_model/0001"],"BlkioDeviceReadBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceWriteIOps":null,"BlkioWeight":0,"BlkioWeightDevice":[],"CapAdd":null,"CapDrop":null,"Cgroup":"","CgroupParent":"","ConsoleSize":[0,0],"ContainerIDFile":"","CpuCount":0,"CpuPercent":0,"CpuPeriod":0,"CpuQuota":0,"CpuRealtimePeriod":0,"CpuRealtimeRuntime":0,"CpuShares":0,"CpusetCpus":"","CpusetMems":"","DeviceCgroupRules":null,"Devices":[],"DiskQuota":0,"Dns":[],"DnsOptions":[],"DnsSearch":[],"ExtraHosts":null,"GroupAdd":null,"IOMaximumBandwidth":0,"IOMaximumIOps":0,"IpcMode":"","Isolation":"","KernelMemory":0,"Links":null,"LogConfig":{"Config":{},"Type":""},"MaskedPaths":null,"Memory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"NanoCpus":0,"NetworkMode":"default","OomKillDisable":false,"OomScoreAdj":0,"PidMode"[ 3104.099143] docker0: port 1(veth7c95a13) entered blocking state
:"","PidsLimit":0,"PortBindings":[ 3104.107501] docker0: port 1(veth7c95a13) entered disabled state
{"8501/tcp":[{"HostIp":"","HostPo[ 3104.116986] device veth7c95a13 entered promiscuous mode
rt":"8501"}]},"Privileged":false,[ 3104.125421] IPv6: ADDRCONF(NETDEV_UP): veth7c95a13: link is not ready
"PublishAllPorts":false,"ReadonlyPaths":null,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":"no"},"SecurityOpt":null,"ShmSize":0,"UTSMode":"","Ulimits":null,"UsernsMode":"","VolumeDriver":"","VolumesFrom":null},"Hostname":"","Image":"gcr.io/automl-vision-ondevice/gcloud-container-1.12.0","Labels":{},"NetworkingConfig":{"EndpointsConfig":{}},"OnBuild":null,"OpenStdin":false,"StdinOnce":false,"Tty":true,"User":"","Volumes":{},"WorkingDir":""}
DEBU[2019-11-13T17:03:24.747445892Z] container mounted via layerStore: &{/var/lib/docker/overlay2/1da18812716e047dc9bb5fef0983bb89f209f75c34e43827324609fbc188c3ff/merged 0xaaaab56b1f00 0xaaaab56b1f00}
DEBU[2019-11-13T17:03:24.781417171Z] Calling POST /v1.39/containers/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e/attach?stderr=1&stdout=1&stream=1
DEBU[2019-11-13T17:03:24.782575540Z] attach: stdout: begin
DEBU[2019-11-13T17:03:24.782604700Z] attach: stderr: begin
DEBU[2019-11-13T17:03:24.783463786Z] Calling POST /v1.39/containers/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e/wait?condition=removed
DEBU[2019-11-13T17:03:24.785909763Z] Calling POST /v1.39/containers/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e/start
DEBU[2019-11-13T17:03:24.793187814Z] container mounted via layerStore: &{/var/lib/docker/overlay2/1da18812716e047dc9bb5fef0983bb89f209f75c34e43827324609fbc188c3ff/merged 0xaaaab56b1f00 0xaaaab56b1f00}
DEBU[2019-11-13T17:03:24.794337782Z] Assigning addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T17:03:24.794416263Z] RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])
DEBU[2019-11-13T17:03:24.794533504Z] Request address PoolID:172.17.0.0/16 App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65533, Sequence: (0xc0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3 Serial:false PrefAddress:<nil>
DEBU[2019-11-13T17:03:24.846320708Z] Assigning addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T17:03:24.860460168Z] Programming external connectivity on endpoint tf-serving_datamatrix (c223a67b042bfbc3cc1b444c58a3fbbddf5e5c58c2bd2439e0fe7850b96864db)
DEBU[2019-11-13T17:03:24.860731009Z] /sbin/iptables, [--wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T17:03:24.874661307Z] /sbin/iptables, [--wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T17:03:24.886331030Z] /sbin/iptables, [--wait -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:03:24.896225219Z] /sbin/iptables, [--wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:03:24.905986208Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:03:24.915729076Z] /sbin/iptables, [--wait -t nat -A POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:03:24.945350205Z] EnableService 5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e START
DEBU[2019-11-13T17:03:24.945426405Z] EnableService 5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e DONE
DEBU[2019-11-13T17:03:24.955761838Z] bundle dir created                            bundle=/var/run/docker/containerd/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e module=libcontainerd namespace=moby root=/var/lib/docker/overlay2/1da18812716e047dc9bb5fef0983bb89f209f75c34e43827324609fbc188c3ff/merged
[ 3104.788420] eth0: renamed from vethed22d95
[ 3104.816287] IPv6: ADDRCONF(NETDEV_CHANGE): veth7c95a13: link becomes ready
[ 3104.823504] docker0: port 1(veth7c95a13) entered blocking state
[ 3104.829444] docker0: port 1(veth7c95a13) entered forwarding state
DEBU[2019-11-13T17:03:25.546137424Z] sandbox set key processing took 255.067431ms for container 5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e
DEBU[2019-11-13T17:03:25.640941450Z] event                                         module=libcontainerd namespace=moby topic=/tasks/create
standard_init_linux.go:211: exec user process caused "exec format error"
DEBU[2019-11-13T17:03:25.761759259Z] event                                         module=libcontainerd namespace=moby topic=/tasks/start
DEBU[2019-11-13T17:03:25.830138979Z] Calling POST /v1.39/containers/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e/resize?h=24&w=80
DEBU[2019-11-13T17:03:25.833493122Z] FIXME: Got an API for which error does not match any expected type!!!: unknown
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
        /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:39
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
        <autogenerated>:1
github.com/docker/docker/builder/builder-next.init
        <autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
        <autogenerated>:1
main.init
        <autogenerated>:1
runtime.main
        /usr/local/go/src/runtime/proc.go:186
runtime.goexit
        /usr/local/go/src/runtime/asm_arm64.s:1037  error_type="*errors.fundamental" module=api
ERRO[2019-11-13T17:03:25.833656443Z] Handler for POST /v1.39/containers/5d4e9e2a6c4bd8ecb5b9d6b956095be64036d0c19e160917b1afe250cda4e56e/resize returned error: bad file descriptor: unknown
DEBU[2019-11-13T17:03:25.833965926Z] FIXME: Got an API for which error does not match any expected type!!!: unknown
github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs.init
        /go/src/github.com/docker/docker/vendor/github.com/containerd/containerd/errdefs/errors.go:39
github.com/docker/docker/vendor/github.com/containerd/containerd/content.init
        <autogenerated>:1
github.com/docker/docker/builder/builder-next.init
        <autogenerated>:1
github.com/docker/docker/api/server/backend/build.init
        <autogenerated>:1
main.init
        <autogenerated>:1
runtime.main
        /usr/local/go/src/runtime/proc.go:186
runtime.goexit
        /usr/local/go/src/runtime/asm_arm64.s:1037  error_type="*errors.fundamental" module=api
DEBU[2019-11-13T17:03:25.881969983Z] event                                         module=libcontainerd namespace=moby topic=/tasks/exit
DEBU[2019-11-13T17:03:25.970535405Z] event                                         module=libcontainerd namespace=moby topic=/tasks/delete
INFO[2019-11-13T17:03:25.970631645Z] ignoring event                                module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
DEBU[2019-11-13T17:03:25.970696566Z] attach: stdout: end
DEBU[2019-11-13T17:03:25.970774326Z] attach: stderr: end
 3105.354821] docker0: port 1(veth7c95a13) entered disabled state
mDEBU[2019-11-13T17:03:25.970[ 3105.363876] vethed22d95: renamed from eth0
856287Z] attach done
DEBU[2019-11-13T17:03:25.971897534Z] Revoking external connectivity on endpoint tf-serving_datamatrix (c223a67b042bfbc3cc1b444c58a3fbbddf5e5c58c2bd2439e0fe7850b96864db)
DEBU[2019-11-13T17:03:25.973650147Z] /sbin/iptables, [--wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T17:03:25.985824112Z] /sbin/iptables, [--wait -t nat -D DOCKER -p tcp -d 0/0 --dport 8501 -j DNAT --to-destination 172.17.0.2:8501 ! -i docker0]
DEBU[2019-11-13T17:03:25.997971557Z] /sbin/iptables, [[ 3105.424859] docker0: port 1(veth7c95a13) entered disabled state
--wait -t filter -C DOCKER ! -i d[ 3105.433894] device veth7c95a13 left promiscuous mode
ocker0 -o docker0 -p tcp -d 172.1[ 3105.439941] docker0: port 1(veth7c95a13) entered disabled state
7.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:03:26.009851521Z] /sbin/iptables, [--wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport 8501 -j ACCEPT]
DEBU[2019-11-13T17:03:26.022345168Z] /sbin/iptables, [--wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:03:26.035314019Z] /sbin/iptables, [--wait -t nat -D POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 8501 -j MASQUERADE]
DEBU[2019-11-13T17:03:26.199860972Z] Releasing addresses for endpoint tf-serving_datamatrix's interface on network bridge
DEBU[2019-11-13T17:03:26.199952413Z] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)
DEBU[2019-11-13T17:03:26.200073374Z] Released address PoolID:LocalDefault/172.17.0.0/16, Address:172.17.0.2 Sequence:App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65532, Sequence: (0xe0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3

The ERRO[2019-11-13T16:52:11.397890416Z] Handler for POST /v1.39/containers/f1855e3d37ddab2e43a88f4cbb74a5397940fd2ab3b5433d4d654dc9b30a02fb/resize returned error: bad file descriptor: unknown error led to suggestion like architecture incompatibility berween docker and coral board, e.g. here. I have followed the suggestions, and noticed that board come with:

Linux jumping-snail 4.9.51-imx #1 SMP PREEMPT Tue May 14 20:34:37 UTC 2019 aarch64 GNU/Linux

And tried to install docker compatible with the aarch64 architecture from directly Docker static distribution , but still throws the same annoying error.

Have anyone, @adr-arroyo maybe you, managed to have a docker container running on the board (besides hello-world)? I am wondering if I have other nasty permisison issues that I do not see!

@adr-arroyo
Copy link
Author

Hello @mmortazavi

I am sorry but I do not remember if I made it work any other container on the coral. I had to stop working on it. However, I do not remember seen this errors, did you follow the steps for the arm installation?

Regards

@mmortazavi
Copy link

mmortazavi commented Nov 14, 2019

Hi @adr-arroyo Thanks for your quick feedback. I see. I thought you continued working on it. Yes I did follow the arm installation. I have already tried a few ways to run docker images customized for my use case, none of them worked! Would you mind opening this ticket again and perhaps change the title to 'Install and Run Docker on Google Coral Dev Board'? I rather have this in this issue and not open another issue. Maybe others see and offer help. Regards

@adr-arroyo adr-arroyo reopened this Nov 15, 2019
@adr-arroyo adr-arroyo changed the title Installing Docker on Google Coral Dev Board Install and Run Docker on Google Coral Dev Board Nov 15, 2019
@adr-arroyo
Copy link
Author

It's done @mmortazavi :)

Hopefully there is someone else trying this and has some more info for us.

@mmortazavi
Copy link

Thanks @adr-arroyo. For some reasons I thought this repo is the official google-coral one, but it is not! I may bring the question to the original repo!

@adr-arroyo
Copy link
Author

It's okay @mmortazavi ;)

But please, reference this issue on the comments of the issue in the original repo!

@Namburger
Copy link

Hi guys, Nam from Coral team here, installing docker binary is pretty straight forward for mendel day:

$ wget https://download.docker.com/linux/static/stable/aarch64/docker-19.03.5.tgz (optionally go [here](https://download.docker.com/linux/static/stable/aarch64/docker-19.03.5.tgz) for more packages)
$ tar xvf docker-19.03.5.tgz
$ sudo cp docker* /usr/bin/

That's all.

if you want to run docker, first make sure the docker daemon is up with (you'll need to do this every time you reboot the board):

$ sudo dockerd & 

test:

$ sudo docker run hello-world

Do this if you don't have the desire to sudo anything:
https://docs.docker.com/install/linux/linux-postinstall/

@Namburger
Copy link

Here is also an example Dockerfile:
https://gist.github.com/Namburger/ceb384626657963f27da18d8a5080486

@ramunelluri184
Copy link

Hi guys, Nam from Coral team here, installing docker binary is pretty straight forward for mendel day:

$ wget https://download.docker.com/linux/static/stable/aarch64/docker-19.03.5.tgz (optionally go [here](https://download.docker.com/linux/static/stable/aarch64/docker-19.03.5.tgz) for more packages)
$ tar xvf docker-19.03.5.tgz
$ sudo cp docker* /usr/bin/

That's all.

if you want to run docker, first make sure the docker daemon is up with (you'll need to do this every time you reboot the board):

$ sudo dockerd & 

test:

$ sudo docker run hello-world

Do this if you don't have the desire to sudo anything:
https://docs.docker.com/install/linux/linux-postinstall/

Hey.. I am trying to configure kubernetes on coral board, which depends on docker installation. I followed your comment and installed docker. everything works but i could not start the "docker.service" through "systemctl" command, in turn kubernetes throws the same error. could you please help me out in this case?

@Namburger
Copy link

Namburger commented Jan 7, 2020

@ramunelluri184 my apologies, I didn't see this earlier. I'm not too familiar with kubernetes, but if you think the docker binary installation method from above is causing this issue, you can try this instead (this way you can have the full debian package):

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
echo "deb [arch=arm64] https://download.docker.com/linux/debian buster stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot now

Hope this helps!

@ramunelluri184
Copy link

ramunelluri184 commented Jan 14, 2020

@ramunelluri184 my apologies, I didn't see this earlier. I'm not too familiar with kubernetes, but if you think the docker binary installation method from above is causing this issue, you can try this instead (this way you can have the full debian package):

$ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
$ echo "deb [arch=arm64] https://download.docker.com/linux/debian buster stable" | sudo tee /etc/apt/sources.list.d/docker.list
$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io

Hope this helps!

Thanks a lot. this worked like a charm and docker is running successfully as a systemd service.

@Namburger Namburger added the DevBoard Related to the dev board label May 24, 2020
@saket424
Copy link

@Namburger
I got a new google coral dev miniboard and am having trouble installing docker on it. I see an error

ERRO[2021-01-18T19:49:27.439668055Z] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded. storage-driver=overlay

Any ideas ?

@saket424
Copy link

I suspect the right docker related flags for kernel support have not been enabled for this new mediatek coral dev miniboard yet. the regular dev board works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevBoard Related to the dev board
Projects
None yet
Development

No branches or pull requests

5 participants