pupilometer/docker/Dockerfile

56 lines
1.6 KiB
Docker

# Use a base image with NVIDIA drivers and CUDA support
FROM nvidia/l4t-base:r32.7.1
# Set environment variables to non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install essential packages
RUN apt-get update && apt-get install -y \
build-essential \
python3-pip \
python3-dev \
gstreamer1.0-tools \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-good1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
git \
meson \
ninja-build \
wget && \
rm -rf /var/lib/apt/lists/*
# --- Basler Pylon SDK Installation ---
# IMPORTANT: You must download the Pylon SDK for Linux ARM64 from the Basler website
# and place the .tar.gz file in the 'docker' directory before building.
# https://www.baslerweb.com/en/sales-support/downloads/software-downloads/pylon-6-3-0-linux-aarch64/
COPY pylon-*.tar.gz /tmp/
RUN tar -xzf /tmp/pylon-*.tar.gz -C /tmp/ && \
/tmp/pylon-*/tools/install.sh && \
rm -rf /tmp/pylon-*
# --- GStreamer Pylon Plugin Installation ---
RUN git clone https://github.com/basler/gst-plugin-pylon.git /opt/gst-plugin-pylon
WORKDIR /opt/gst-plugin-pylon
RUN meson build && \
ninja -C build && \
ninja -C build install
# --- Application Setup ---
WORKDIR /app
COPY . /app
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Expose the Flask port
EXPOSE 5000
# Set the entrypoint
CMD ["python3", "src/pupilometerApp/app.py"]