# API development image with Huateng Vision SDK (local bundle) FROM python:3.11-slim # Install system dependencies required by SDK and tooling RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates tar \ libusb-1.0-0 libgl1 libx11-6 libxext6 libxcb1 libgtk-3-0 \ && rm -rf /var/lib/apt/lists/* # Copy SDK bundle placed under api/camera_sdk and install native libs WORKDIR /app COPY camera_sdk /tmp/camera_sdk RUN set -eux; \ mkdir -p /opt/mvsdk; \ TARBALL="$(find /tmp/camera_sdk -maxdepth 1 -type f -name '*.tar.gz' | head -n1)"; \ if [ -z "$TARBALL" ]; then echo 'No SDK .tar.gz found in camera_sdk'; exit 1; fi; \ tar -xzf "$TARBALL" -C /opt/mvsdk || true; \ # Copy any .so library files into /usr/lib so ctypes can load libMVSDK.so find /opt/mvsdk -type f -name '*.so*' -exec cp -n {} /usr/lib/ \; || true; \ ldconfig || true ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib # The actual app code is bind-mounted by docker-compose at runtime