-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 676 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 676 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
# Start from a slim Python base
FROM python:3.11-slim
# Install OS build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
git \
libopenblas-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Set work directory
WORKDIR /app
# Pre-install numpy and cython before copying to prevent repeated rebuilds
RUN pip install --upgrade pip
RUN pip install numpy Cython
# Copy the whole project into the container
COPY . /app
# Install the package (cython extensions + dependencies)
RUN pip install -e .
# Optional: run tests or verify build
# RUN pytest
# Default entrypoint
CMD ["python"]