FROM python:3.12-slim
WORKDIR /workspace
RUN python -m pip install --no-cache-dir pytest==8.4.2 coverage==7.16.0 hypothesis==6.151.9 pretend==1.0.9 tomli_w==1.2.0
COPY source /workspace
RUN python -m pip install --no-cache-dir -e .
ENV PYTHONDONTWRITEBYTECODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
RUN apt-get update && apt-get install -y --no-install-recommends tmux && rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 learner && chown -R learner:learner /workspace
