-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
30 lines (22 loc) · 1.06 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# base-image for python on any machine using a template variable,
# see more about dockerfile templates here: https://www.balena.io/docs/learn/develop/dockerfile/
# The following results in a 64-bit image, which causes or contributes to compilation problems with the idtech library.
# FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3.7.4-buster-run
# - which becomes
# FROM balenalib/raspberrypi4-64-python:3.7.4-buster-run
# So instead we're forcing a 32-bit image.
FROM balenalib/raspberrypi3-python:3.10-buster-run
# use `install_packages` if you need to install dependencies,
# for instance if you need git, just uncomment the line below.
COPY ./c_project/lib/libIDTechSDK.so /usr/local/lib/
RUN install_packages g++ git curl libusb-1.0-0-dev
RUN ldconfig
ENV PYTHONUNBUFFERED 1
COPY ./requirements/base.txt /code/base.txt
RUN pip install -Ur /code/base.txt
COPY . /code/
WORKDIR /code/
# Enable udevd so that plugged dynamic hardware devices show up in our container.
ENV UDEV=1
# main.py will run when container starts up on the device
CMD ["python", "-m", "src.runner"]