FROM python:3.11.15
# Build dependencies for NumPy spin-based build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential ninja-build cmake git gfortran libgfortran5 libopenblas-dev pkg-config && \
rm -rf /var/lib/apt/lists/*
# Install spin build tool (Meson-based build orchestrator)
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
RUN python -m pip install --no-cache-dir spin
# Prepare workdir and copy source
WORKDIR /workspace
COPY . .
# OpenBLAS/pkg-config path for build
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
# Install Python build/test requirements if available (best-effort)
RUN if [ -f requirements/build_requirements.txt ]; then \
python -m pip install --no-cache-dir -r requirements/build_requirements.txt || true; \
fi && \
if [ -f requirements/test_requirements.txt ]; then \
python -m pip install --no-cache-dir -r requirements/test_requirements.txt || true; \
fi
# Build from source using spin
RUN spin build -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
# Basic interactive entrypoint
CMD ["/bin/bash"]
FROM python:3.11.15
# Build dependencies for NumPy spin-based build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential ninja-build cmake git gfortran libgfortran5 libopenblas-dev pkg-config meson && \
rm -rf /var/lib/apt/lists/*
# Install spin build tool (Meson-based build orchestrator)
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
RUN python -m pip install --no-cache-dir spin
# Prepare workdir and copy source
WORKDIR /workspace
COPY . .
# OpenBLAS/pkg-config path for build
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
# Install Python build/test requirements if available (best-effort)
RUN if [ -f requirements/build_requirements.txt ]; then \
python -m pip install --no-cache-dir -r requirements/build_requirements.txt || true; \
fi && \
if [ -f requirements/test_requirements.txt ]; then \
python -m pip install --no-cache-dir -r requirements/test_requirements.txt || true; \
fi
# Build from source using spin
RUN spin build -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
# Basic interactive entrypoint
CMD ["/bin/bash"]
# Exclude any local development artefacts .git .gitignore __pycache__/ *.pyc *.pyo build/ dist/ *.egg-info/ *.eggs/ .env .venv venv/ env/ __pycache__ *.swp *.swo *.tmp .cache/ .pytest_cache/ doc/ docs/_build/ *.so *.dylib *.dll node_modules/
# Exclude any local development artefacts .git .gitignore __pycache__/ *.pyc *.pyo build/ dist/ *.egg-info *.eggs/ .env .venv venv/ env/ __pycache__ *.swp *.swo *.tmp .cache/ .pytest_cache/ doc/ docs/_build/ *.so *.dylib *.dll node_modules/