Unfortunately, Iβm unable to push the python example referenced in the tutorial. More information about the failure can be found in the github issue:
Iβm able to push the node example just fine, but thatβs not what I need
Hello Daniel,
Thanks for reporting this issue and eventually helping to fix this as well. Your contribution is greatly appreciated. I have approved your PR and itβs good to go now. Please let us know if this resolved your issue.
I may not be looking in the right place, but in the summary tab of my device, I get no output from the edge-logic service, despite trying to stop & start or restart that service.
$ balena push {fleet}
--------------------------------------------------------------------------------
[Warn] Node.js version "14.19.1" does not satisfy requirement ">=12.8.0 <13.0.0"
[Warn] This may cause unexpected behavior.
--------------------------------------------------------------------------------
[Info] Starting build for {fleet}, user {name}
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1921001/devices
[Info] Building on arm06
[Info] Pulling previous images for caching purposes...
[Success] Successfully pulled cache images
[edge-logic] Step 1/10 : FROM balenalib/coral-dev-debian:latest
[model] Step 1/3 : FROM balenalib/coral-dev-debian
[edge-logic] ---> 664ecf7af092
[edge-logic] Step 2/10 : RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
[edge-logic] ---> Running in 94e3d57519b2
[model] ---> 664ecf7af092
[model] Step 2/3 : COPY . .
[edge-logic] Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
[edge-logic] Architecture: ARM v8
[edge-logic] OS: Debian Buster
[edge-logic] Variant: run variant
[edge-logic] Default variable(s): UDEV=off
[edge-logic] Extra features:
[edge-logic] - Easy way to install packages with `install_packages <package-name>` command
[edge-logic] - Run anywhere with cross-build feature (for ARM only)
[edge-logic] - Keep the container idling with `balena-idle` command
[edge-logic] - Show base image details with `balena-info` command
[edge-logic] % Total % Received % Xferd Average Speed Time Time Time Current
[edge-logic] Dload Upload Total Spent Left Speed
0ge-logic]
[edge-logic] 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[edge-logic] Warning: apt-key output should not be parsed (stdout is not a terminal)
[edge-logic]
100 2537 100 2537 0 0 9093 0 --:--:-- --:--:-- --:--:-- 9093
[edge-logic]
[model] ---> 3da5024275fd
[model] Step 3/3 : CMD ["bash","run.sh"]
[model] ---> Running in f6b27adac1fe
[edge-logic] OK
[model] Removing intermediate container f6b27adac1fe
[model] ---> db5520bdfd3f
[model] Successfully built db5520bdfd3f
[edge-logic] Removing intermediate container 94e3d57519b2
[edge-logic] ---> 05c4a2a5f2f3
[edge-logic] Step 3/10 : RUN install_packages python3-pip
[edge-logic] ---> Running in 4eaf93a1f5ab
[edge-logic] Reading package lists...
[edge-logic] Building dependency tree...
[edge-logic] Reading state information...
[edge-logic] The following package was automatically installed and is no longer required:
[edge-logic] libidn11
[edge-logic] Use 'apt autoremove' to remove it.
[edge-logic] The following additional packages will be installed:
[edge-logic] python-pip-whl python3-distutils python3-lib2to3
[edge-logic] Recommended packages:
[edge-logic] build-essential python3-dev python3-setuptools python3-wheel
[edge-logic] The following NEW packages will be installed:
[edge-logic] python-pip-whl python3-distutils python3-lib2to3 python3-pip
[edge-logic] 0 upgraded, 4 newly installed, 0 to remove and 52 not upgraded.
[edge-logic] Need to get 1980 kB of archives.
[edge-logic] After this operation, 3772 kB of additional disk space will be used.
[edge-logic] Get:1 http://deb.debian.org/debian buster/main arm64 python-pip-whl all 18.1-5 [1591 kB]
[edge-logic] Get:2 http://deb.debian.org/debian buster/main arm64 python3-lib2to3 all 3.7.3-1 [76.7 kB]
[edge-logic] Get:3 http://deb.debian.org/debian buster/main arm64 python3-distutils all 3.7.3-1 [142 kB]
[edge-logic] Get:4 http://deb.debian.org/debian buster/main arm64 python3-pip all 18.1-5 [171 kB]
[edge-logic] debconf: delaying package configuration, since apt-utils is not installed
[edge-logic]
[edge-logic] Fetched 1980 kB in 0s (6934 kB/s)
[edge-logic] Selecting previously unselected package python-pip-whl.
[edge-logic] (Reading database ...
(Reading database ... 75%tabase ... 5%
[edge-logic] (Reading database ... 80%
[edge-logic] (Reading database ... 85%
[edge-logic] (Reading database ... 90%
[edge-logic] (Reading database ... 95%
(Reading database ... 11395 files and directories currently installed.)
[edge-logic] Preparing to unpack .../python-pip-whl_18.1-5_all.deb ...
[edge-logic] Unpacking python-pip-whl (18.1-5) ...
[edge-logic] Selecting previously unselected package python3-lib2to3.
[edge-logic] Preparing to unpack .../python3-lib2to3_3.7.3-1_all.deb ...
[edge-logic] Unpacking python3-lib2to3 (3.7.3-1) ...
[edge-logic] Selecting previously unselected package python3-distutils.
[edge-logic] Preparing to unpack .../python3-distutils_3.7.3-1_all.deb ...
[edge-logic] Unpacking python3-distutils (3.7.3-1) ...
[edge-logic] Selecting previously unselected package python3-pip.
[edge-logic] Preparing to unpack .../python3-pip_18.1-5_all.deb ...
[edge-logic] Unpacking python3-pip (18.1-5) ...
[edge-logic] Setting up python-pip-whl (18.1-5) ...
[edge-logic] Setting up python3-lib2to3 (3.7.3-1) ...
[edge-logic] Setting up python3-distutils (3.7.3-1) ...
[edge-logic] Setting up python3-pip (18.1-5) ...
[edge-logic] Removing intermediate container 4eaf93a1f5ab
[edge-logic] ---> 9ae7fc6edc6e
[edge-logic] Step 4/10 : ENV UDEV=1
[edge-logic] ---> Running in b6bc35b0cac3
[edge-logic] Removing intermediate container b6bc35b0cac3
[edge-logic] ---> 17845a30bae6
[edge-logic] Step 5/10 : COPY 99-tpu.rules /etc/udev/rules.d/99-tpu.rules
[edge-logic] ---> 6191069f19ee
[edge-logic] Step 6/10 : WORKDIR /usr/src/app
[edge-logic] ---> Running in ef0a62c030fb
[edge-logic] Removing intermediate container ef0a62c030fb
[edge-logic] ---> a05680f67e66
[edge-logic] Step 7/10 : COPY src src
[edge-logic] ---> 16d8fc8537f3
[edge-logic] Step 8/10 : COPY images images
[edge-logic] ---> 8b07d4568658
[edge-logic] Step 9/10 : COPY run.sh run.sh
[edge-logic] ---> 24be0b0d4b6c
[edge-logic] Step 10/10 : CMD ["bash","run.sh"]
[edge-logic] ---> Running in 7128aa673481
[edge-logic] Removing intermediate container 7128aa673481
[edge-logic] ---> 44b8277cc790
[edge-logic] Successfully built 44b8277cc790
[Info] Generating image deltas from release 0de381bce6b48a65587650682db6decd (id: 2125283)
[Success] Successfully generated image deltas
[Info] Uploading images
[Success] Successfully uploaded images
[Info] Built on arm06
[Success] Release successfully created!
[Info] Release: 32786f02795741f98be320aeb8c0f84b (id: 2125948)
[Info] ββββββββββββββ¬βββββββββββββ¬βββββββββββββ¬βββββββββββββββββββββββ
[Info] β Service β Image Size β Delta Size β Build Time β
[Info] ββββββββββββββΌβββββββββββββΌβββββββββββββΌβββββββββββββββββββββββ€
[Info] β edge-logic β 222.39 MB β 15.35 MB β 1 minute, 11 seconds β
[Info] ββββββββββββββΌβββββββββββββΌβββββββββββββΌβββββββββββββββββββββββ€
[Info] β model β 219.94 MB β 3.89 MB β 27 seconds β
[Info] ββββββββββββββ΄βββββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββ
[Info] Build finished in 5 minutes, 42 seconds
\
\
\\
\\
>\/7
_.-(6' \
(=___._/` \
) \ |
/ / |
/ > /
j < _\
_.-' : ``.
\ r=._\ `.
<`\\_ \ .`-.
\ r-7 `-. ._ ' . `\
\`, `-.`7 7) )
\/ \| \' / `-._
|| .'
\\ (
>\ >
,.-' >.'
<.'_.''
<'
(base)
Dashboard Logs (post reboot after re-deployment):
Rebooting
Supervisor starting
Starting service 'model sha256:db5520bdfd3f35467fb1cbb8f59d431845dcbc1a457e22ffb4bb434d8121da16'
Started service 'model sha256:db5520bdfd3f35467fb1cbb8f59d431845dcbc1a457e22ffb4bb434d8121da16'
model Copying Model to shared volume...
model 'model.tflite' -> 'shared-model/model.tflite'
model 'labels.txt' -> 'shared-model/labels.txt'
There are no logs for edge-logic service. It is listed as downloaded and can be started, stopped, or restarted.
From what I can tell, the model service runs to the point that it copies the models but edge-logic does not run successfully.
Iβm still hacking around on this. in altering the docker-compose.yml file to remove nearly all attributes that differ from the model service, the edge-logic service did run. However, Iβm sure some of those attributes are needed, so Iβm re-adding them one-by-one
From my standpoint, Iβve solved this issue on my own, but did want to point out that the depends_on: parameter was causing issues. Iβm not super experienced with docker, so I donβt have an explanation for what/why that is this case.
Hello @dt1900, just following up here. The depends_on merely starts the containers in a predefined order. In this case, the edge-logic service wonβt start unless the model service has already started. This is so the model service can copy the models first. I also see that edge-logic is not producing any output, but was able to easily solve that by idling the model service after it has finished copying. Thanks for submitting your pull request though - Iβll take a look at it and post any comments regarding it there.