FROM python:3.12-slim@sha256:dddfd7e07f9d15aeeca61529320492139d21cac7f0070c00609243e51e4e0016
WORKDIR /srv/riichi
COPY requirements.lock .
COPY wheels /wheels
RUN pip install --no-index --find-links=/wheels -r requirements.lock && rm -rf /wheels
COPY app ./app
COPY models ./models
COPY licenses ./licenses
COPY LICENSE ./LICENSE
COPY source.zip ./source.zip
RUN useradd --uid 10001 --create-home riichi
USER 10001
EXPOSE 8080
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080", "--no-access-log"]
