FROM --platform=linux/amd64 public.ecr.aws/docker/library/python:3.13-slim-bookworm@sha256:01f42367a0a94ad4bc17111776fd66e3500c1d87c15bbd6055b7371d39c124fb ENTRYPOINT [] ENV PYTHONPATH= ENV PYTHONSAFEPATH=1 ENV DEBIAN_FRONTEND=noninteractive \ PYTHONHASHSEED=0 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ OMP_NUM_THREADS=1 \ MKL_NUM_THREADS=1 \ OPENBLAS_NUM_THREADS=1 RUN useradd --create-home --uid 1001 agent COPY ./requirements.txt /tmp/requirements.txt COPY ./requirements-verifier.txt /tmp/requirements-verifier.txt RUN /usr/local/bin/python3 -m pip install --no-cache-dir \ -r /tmp/requirements.txt -r /tmp/requirements-verifier.txt \ && rm /tmp/requirements.txt /tmp/requirements-verifier.txt COPY . /tests RUN chown -R root:root /tests \ && chmod 700 /tests/hidden_data /tests/hidden_data/intermediate /tests/hidden_data/final \ && chmod +x /tests/test.sh /tests/intermediate.sh \ && find /tests -exec touch -d @1700000000 {} + WORKDIR /tests ENV HF_HUB_OFFLINE=1 ENV TRANSFORMERS_OFFLINE=1 # ---- ARE 1.1 grader layer (appended to the task's own verifier Dockerfile) ---- ARG ARE_ROLE # python.org images ship /usr/local/bin/python3; distro-python bases (kaggle GPU) lack # ensurepip, so fall back to a pip-less venv filled by the base interpreter's pip. RUN PY=$(command -v /usr/local/bin/python3 || command -v python3) \ && if "$PY" -m venv /opt/are/venv; then \ /opt/are/venv/bin/pip install --no-cache-dir "fastmcp==2.14.7"; \ else rm -rf /opt/are/venv && "$PY" -m venv --without-pip /opt/are/venv \ && "$PY" -m pip --python /opt/are/venv/bin/python install --no-cache-dir "fastmcp==2.14.7"; fi COPY are/ /opt/are/ # The val grader, whose output reaches the agent, never holds the private grader or its # data. The test grader keeps everything; nothing from it reaches the agent. RUN rm -rf /tests/are /tests/Dockerfile.are \ && if [ "$ARE_ROLE" = "val" ]; then rm -rf /tests/test.sh /tests/hidden_data/final; fi ENV ARE_ROLE=$ARE_ROLE CMD ["/opt/are/venv/bin/python", "/opt/are/server.py"]