FROM python:3.11-slim

WORKDIR /sdk

COPY sdk/python/ /sdk/

RUN touch README.md && pip install --no-cache-dir ".[dev]"

# Run as a non-root user; pytest writes its cache under /sdk.
RUN useradd --create-home tester && chown -R tester /sdk
USER tester

CMD ["pytest", "tests/", "-v", "--asyncio-mode=auto", "--tb=short"]
