Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 1.5 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (30 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Pinned, minimal image so the grading harness runs your submission
# identically regardless of local setup. Course staff run every submission through this
# same image at grading time.
FROM python:3.11-slim
WORKDIR /repo
# C/C++ toolchain — present so a submission that compiles part of itself
# as a Cython or pybind11 extension (see docs/SUBMISSION_INTERFACE.md,
# "Compiled extensions") builds correctly here and in course staff's
# grading image (instructor-tools/Dockerfile.grading, kept in lockstep
# with this one). Installed at image-build time only; the grading
# container still runs with --network none at scoring time.
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Build an optional compiled extension in the same location used at grading.
RUN if [ -f submission/setup.py ]; then \
cd submission && python setup.py build_ext --inplace; \
fi
# Default command: run the interface conformance + smoke-test suite
# against the toy set. Course staff override CMD to point at the real
# corpus/topics/qrels for scoring.
CMD ["python", "-m", "harness.run_harness", \
"--corpus", "data/toy/corpus.jsonl", \
"--queries", "data/toy/queries_dev.tsv", \
"--qrels", "data/toy/qrels_dev.txt", \
"--baseline-run", "data/toy/reference_bm25_run_dev.trec", \
"--run-out", "runs/dev_run.trec", \
"--report-out", "runs/dev_report.json"]