-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (26 loc) · 855 Bytes
/
Dockerfile
File metadata and controls
30 lines (26 loc) · 855 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
FROM python:3.11-slim
# Install build prerequisites and uv for dependency management
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
gfortran \
iptables \
libfreetype6-dev \
liblapack-dev \
libopenblas-dev \
libpng-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
&& rm -rf /tmp/*
ENV PATH="/root/.local/bin:${PATH}"
# Pre-install the scientific stack via uv using a dedicated lockfile
COPY pyproject.toml uv.lock /tmp/executor/
RUN uv sync --directory /tmp/executor \
--no-dev \
--frozen \
&& mv /tmp/executor/.venv /opt/executor-venv \
&& rm -rf /tmp/executor
ENV VIRTUAL_ENV="/opt/executor-venv"
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"