-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 1.01 KB
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 1.01 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
FROM python:3.11-slim
# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Ensure matplotlib works headless
ENV MPLBACKEND=Agg
WORKDIR /app
# Install system deps (optional; wheels usually suffice, but keep minimal)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency descriptors first (better Docker layer caching)
COPY requirements.txt requirements-dev.txt pyproject.toml setup.py README.md LICENSE ./
# Install dependencies
RUN pip install --no-cache-dir -U pip && \
pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -r requirements-dev.txt && \
pip install --no-cache-dir -e .
# Copy source code and experiments/tests
COPY src/ src/
COPY experiments/ experiments/
COPY tests/ tests/
COPY run_full_experiments.py run_tests.py ./
# Default: quick experiments + tests (CI-style smoke run)
CMD ["bash", "-lc", "python run_tests.py && python run_full_experiments.py --quick --output-dir results_docker"]