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

Fixes issue with edge-logic service not starting due to models depend… #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
depends_on:
- model
volumes:
- 'model-data:/models'
- 'model-data:/models:ro'
labels:
io.balena.features.kernel-modules: '1'
io.balena.features.firmware: '1'
Expand Down
4 changes: 3 additions & 1 deletion edge-logic/run.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

echo "Starting Web Server"

# Run a simple classification on the supplied image.
# If the model or labels are not available, the container
# will exit and try again.
python3 /usr/src/app/app.py

# Run balena-idle after our py3 script exits so the container keeps running
balena-idle
balena-idle
5 changes: 4 additions & 1 deletion models/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

#Copy model and labels to shared volume
echo "Copying Model to shared volume..."
cp -v *{tflite,txt} shared-model/
cp -v *{tflite,txt} shared-model/

#Keep container alive long enough for dependent containers to start
sleep 15