Skip to content

Commit e880242

Browse files
committed
WIP: fix build
1 parent a3ee71c commit e880242

File tree

5 files changed

+2309
-28
lines changed

5 files changed

+2309
-28
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
python-impl:
2424
- python
2525
python-version:
26-
- '3.10'
2726
- '3.11'
2827
- '3.12'
2928
steps:

Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,29 @@
33
ARG PYTHON=3.11
44
ARG DEBIAN=bullseye
55

6+
# use this image to copy uv binaries from
7+
FROM ghcr.io/astral-sh/uv:python$PYTHON-bookworm-slim AS uv-bin
8+
RUN uv -V
9+
RUN uvx -V
10+
611
# stage-0: copy pyproject.toml/poetry.lock and install the production set of dependencies
7-
FROM python:$PYTHON-slim-$DEBIAN as stage-0
12+
FROM python:$PYTHON-slim-$DEBIAN AS stage-0
813
ARG PYTHON
914
# install runtime first deps to speedup the dev deps and because layers will be reused on stage-1
1015
RUN apt-get -qy update
1116
RUN apt-get -qy install libssl1.1 graphviz librocksdb6.11
1217
# dev deps for this build start here
1318
RUN apt-get -qy install libssl-dev libffi-dev build-essential zlib1g-dev libbz2-dev libsnappy-dev liblz4-dev librocksdb-dev cargo git pkg-config
19+
COPY --from=uv-bin /usr/local/bin/uv /usr/local/bin/uvx /bin/
1420
# install all deps in a virtualenv so we can just copy it over to the final image
15-
RUN pip --no-input --no-cache-dir install --upgrade pip wheel poetry
16-
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
1721
WORKDIR /app/
18-
COPY pyproject.toml poetry.lock ./
19-
RUN poetry install -n -E sentry --no-root --only=main
22+
COPY pyproject.toml uv.lock ./
23+
#RUN uv pip install --extra sentry -e .
2024
COPY hathor ./hathor
2125
COPY README.md ./
22-
RUN poetry build -f wheel
23-
RUN poetry run pip install dist/hathor-*.whl
26+
RUN uv sync --frozen
27+
RUN uv build --sdist --wheel
28+
RUN uv pip install dist/hathor-*.whl
2429

2530
# finally: use production .venv from before
2631
# lean and mean: this image should be about ~50MB, would be about ~470MB if using the whole stage-1

0 commit comments

Comments
 (0)