-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 816 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 816 Bytes
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
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git gcc g++ make swig \
python3-dev libgmp-dev libmpfr-dev libmpc-dev \
&& rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Copy project files
COPY . .
# Set version for setuptools-scm
ENV SETUPTOOLS_SCM_PRETEND_VERSION=1.0.0
# Install build tools first
RUN uv pip install --system setuptools wheel Cython build
# Build blst and Cython extensions
RUN python scripts/setup_env.py
# Install project with all dependencies from pyproject.toml
RUN uv pip install --system --no-build-isolation -e ".[dev]"
# Run tests
RUN uv run pytest tests/ -v --tb=short
# Default: run tests
CMD ["uv", "run", "pytest", "tests/", "-v"]