Skip to content

Commit 82223c0

Browse files
committed
fix no camera available via udev
1 parent a9dd73b commit 82223c0

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Dockerfile.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:bullseye
22

33
RUN install_packages \
4+
libcamera-dev \
45
libcamera-apps-lite \
6+
python3 \
57
v4l-utils
68

79
WORKDIR /usr/src/app
@@ -10,4 +12,8 @@ COPY start.sh ./
1012

1113
RUN chmod +x start.sh
1214

15+
# RUN usermod -a -G video root
16+
17+
ENV UDEV=on
18+
1319
CMD ["sh","./start.sh"]

balena.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ assets:
1313
url: ''
1414
data:
1515
applicationConfigVariables:
16-
- BALENA_HOST_CONFIG_gpu_mem: 64
16+
- BALENA_HOST_CONFIG_gpu_mem: 128
1717
- BALENA_HOST_CONFIG_dtoverlay: "vc4-kms-v3d"
1818
- BALENA_HOST_CONFIG_camera_auto_detect: 1
19+
- BALENA_HOST_CONFIG_max_framebuffers: 2
1920
defaultDeviceType: raspberry-pi
2021
supportedDeviceTypes:
2122
- raspberry-pi

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: "2.1"
2+
3+
services:
4+
libcamera:
5+
build: ./
6+
restart: always
7+
privileged: true
8+
# labels:
9+
# io.balena.features.kernel-modules: '1'
10+
# io.balena.features.firmware: '1'
11+
# group_add:
12+
# - video
13+

start.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3-
libcamera-hello --list-cameras
3+
udevadm control --reload
4+
5+
libcamera-hello --list-cameras -n -v
46

57
sleep infinity

0 commit comments

Comments
 (0)