FROM python:3.12-slim@sha256:1148dbb014615300fa7e713b2f94f550c0d1c69780c0805f84f093ceee34dd0b
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt && useradd --uid 10001 --create-home vision
COPY server.py relay.py rtdetr.py rfdetr.py launch.py behavior_jobs.py remote_media.py range_bridge.py timeline_jobs.py timeline_service.py timeline_behavior.py timeline_faces.py face_locations.py /app/
USER 10001:10001
EXPOSE 61502
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:61502/health',timeout=4)"
ENTRYPOINT ["python","-B","/app/server.py"]
