FROM balenalib/aarch64-debian:bullseye-build LABEL io.balena.device-type="raspberrypi4-64" RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/raspberrypiorg.gpg] http://archive.raspberrypi.org/debian bullseye main" >> /etc/apt/sources.list.d/raspi.list &&\ mkdir -p /etc/apt/keyrings &&\ curl -fsSL http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | gpg --dearmor -o /etc/apt/keyrings/raspberrypiorg.gpg RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y RUN apt-get install -y python3 \ python3-dev \ python3-pip \ python3-setuptools # Install and Build Librealsense (For D415 Intel RealSense Camera) RUN apt-get install -y git libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev cmake libglfw3-dev build-essential RUN git clone https://github.com/IntelRealSense/librealsense.git RUN cd librealsense/ && ./scripts/setup_udev_rules.sh RUN mkdir build &&\ cd build &&\ cmake /librealsense/ -DBUILD_PYTHON_BINDINGS=bool:true -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DCMAKE_BUILD_TYPE=Release &&\ make -j4 &&\ make install COPY __init__.py /usr/lib/python3/dist-packages/pyrealsense2/ # Install dependencies RUN apt-get update && \ apt-get install -yq \ python3 \ python3-dev \ python3-pip \ python3-setuptools \ gstreamer-1.0 \ v4l-utils \ libopus-dev \ libvpx-dev \ libsrtp2-dev \ libopencv-dev \ libatlas3-base \ libatlas-base-dev \ libavformat-dev \ libswscale-dev \ libavdevice-dev \ libavfilter-dev \ libavcodec-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Enable the v4l2 driver for the Raspberry Pi camera #RUN printf "bcm2835-v4l2\n" >> /etc/modules RUN pip3 install --upgrade pip RUN pip3 install async-timeout av RUN pip3 install pyee aiohttp aiohttp_basicauth aioice aiortc numpy opencv-python WORKDIR /usr/src/app COPY ./app/ /usr/src/app/ CMD ["python3", "server.py"]