-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
33 lines (28 loc) · 1.22 KB
/
Copy pathDockerfile.dev
File metadata and controls
33 lines (28 loc) · 1.22 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
# Sandboxed dev container — every make target runs inside this so the host
# stays clean. Has uv + dev tools + a minimal "fake" torch via stubs so unit
# tests work without pulling real PyTorch.
#
# Real ML libs (torch, chronos, timesfm, uni2ts) are NOT installed here — they
# live in the prod images. Unit tests use conftest.py to stub the backends, so
# none of that is needed for `make test-unit`.
FROM python:3.12-slim-bookworm@sha256:d193c6f51a7dbd10395d6328de3a7edb0516fb0608ca138036576f574c3e07d2
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PROJECT_ENVIRONMENT=/opt/venv \
PATH=/opt/venv/bin:$PATH \
PYTHONPATH=/work/src \
TZ=UTC
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.11.15@sha256:e590846f4776907b254ac0f44b5b380347af5d90d668138ca7938d1b0c2f98d3 /uv /usr/local/bin/uv
WORKDIR /work
COPY pyproject.toml uv.lock* ./
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --group dev --no-install-project \
|| uv sync --group dev --no-install-project