darkbit1001's picture
wrap up and tidy
8d44598
raw
history blame contribute delete
894 Bytes
FROM python:3.12-slim-trixie
# System deps (Pillow, RKNN, etc.)
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
procps
# && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python deps
COPY requirements.txt /app/requirements.txt
RUN python -m venv /venv && \
/venv/bin/pip install --no-cache-dir -U pip setuptools wheel && \
/venv/bin/pip install --no-cache-dir -r /app/requirements.txt
# 👇 THIS copies *everything except what .dockerignore excludes*
COPY . /app
# Copy RKNN runtime shared library into image
COPY librknnrt.so /usr/lib/librknnrt.so
RUN ldconfig
ENV PATH="/venv/bin:$PATH"
ENV PYTHONUNBUFFERED=1
ENV PORT=4200
ENV NUM_WORKERS=1
ENV QUEUE_MAX=8
ENV MODEL_ROOT=/models
EXPOSE 4200
CMD ["uvicorn", "lcm_server:app", "--host", "0.0.0.0", "--port", "4200", "--no-access-log"]