-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
40 lines (32 loc) · 1.09 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
34
35
36
37
38
39
40
FROM python:3.10-slim-bullseye
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# uv configuration
ENV UV_LINK_MODE=copy
ENV UV_CACHE_DIR=/root/.cache/uv
RUN apt-get -qq update \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \
curl \
python-dev \
build-essential \
libopenblas-dev \
gfortran \
libboost-thread-dev \
glpk-utils \
libglpk-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean -y \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL=/usr/local/bin sh
WORKDIR /app
COPY pyproject.toml uv.lock VERSION.txt /app/
COPY hots /app/hots
# Install dependencies from the lockfile (reproducible build)
# - --frozen: fail if uv.lock doesn't match pyproject.toml
# - --no-editable: install as a normal wheel/site-packages install
# - extras: include optional runtime bits if needed
ARG UV_EXTRAS="kafka"
RUN uv sync --frozen --no-editable --extra "$UV_EXTRAS"
# Run the CLI by default
ENTRYPOINT ["uv", "run", "--", "hots"]