@@ -89,14 +89,9 @@ RUN apt-get update -qq && \
8989 tclsh
9090
9191ENV PATH="/root/.local/bin:$PATH" \
92- PYTHON_VERSION=3 \
93- POETRY_VERSION=2.0.1
94- RUN curl -sSL https://install.python-poetry.org | python3 - && \
95- poetry self add poetry-plugin-export
96- RUN mkdir -p /root/.venvs && \
97- python3 -m venv /root/.venvs/cln && \
98- . /root/.venvs/cln/bin/activate && \
99- pip3 install --upgrade pip setuptools wheel
92+ PYTHON_VERSION=3
93+ RUN wget -qO- https://astral.sh/uv/install.sh | sh && \
94+ && uv sync --all-extras --all-groups
10095
10196RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz -O zlib.tar.gz && \
10297 wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip -O sqlite.zip && \
@@ -108,13 +103,6 @@ RUN git clone --recursive /tmp/lightning . && \
108103 git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
109104
110105# Do not build python plugins here, python doesn't support cross compilation.
111- RUN poetry lock && \
112- poetry export -o requirements.txt --without-hashes
113- RUN mkdir -p /root/.venvs && \
114- python3 -m venv /root/.venvs/cln && \
115- . /root/.venvs/cln/bin/activate && \
116- pip3 install -r requirements.txt && \
117- pip3 cache purge
118106WORKDIR /
119107
120108FROM base-builder AS base-builder-linux-amd64
@@ -228,46 +216,14 @@ RUN ( ! [ -n "${target_host}" ] ) || \
228216RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \
229217 (sed -i '/documentation = "https:\/\/ docs.rs\/ cln-grpc"/a include = ["**\/ *.*"]' cln-grpc/Cargo.toml)
230218
231- # Ensure that the desired grpcio-tools & protobuf versions are installed
232- # https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381
233- RUN poetry lock && poetry install && \
234- poetry self add poetry-plugin-export
235-
236219# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix
237- # poetry.lock changed due to pyln-client, pyln-proto and pyln-testing version updates
238220RUN git reset --hard HEAD
239221
240- RUN ./configure --prefix=/tmp/lightning_install --enable-static && poetry run make install
222+ RUN ./configure --prefix=/tmp/lightning_install --enable-static && uv run make install
241223
242224WORKDIR /opt/lightningd
243225RUN echo 'RUSTUP_INSTALL_OPTS="${RUSTUP_INSTALL_OPTS}"' > /tmp/rustup_install_opts.txt
244226
245- # We need to build python plugins on the target's arch because python doesn't support cross build
246- FROM ${BASE_DISTRO} AS builder-python
247- RUN apt-get update -qq && \
248- apt-get install -qq -y --no-install-recommends \
249- git \
250- curl \
251- libtool \
252- pkg-config \
253- autoconf \
254- automake \
255- build-essential \
256- libffi-dev \
257- libssl-dev \
258- python3 \
259- python3-dev \
260- python3-pip \
261- python3-venv && \
262- apt-get clean && \
263- rm -rf /var/lib/apt/lists/*
264-
265- ENV PYTHON_VERSION=3
266- RUN mkdir -p /root/.venvs && \
267- python3 -m venv /root/.venvs/cln && \
268- . /root/.venvs/cln/bin/activate && \
269- pip3 install --upgrade pip setuptools wheel
270-
271227# Copy rustup_install_opts.txt file from builder
272228COPY --from=builder /tmp/rustup_install_opts.txt /tmp/rustup_install_opts.txt
273229# Setup ENV $RUSTUP_INSTALL_OPTS for this stage
@@ -286,7 +242,6 @@ RUN apt-get update && \
286242 inotify-tools \
287243 jq \
288244 python3 \
289- python3-pip && \
290245 apt-get clean && \
291246 rm -rf /var/lib/apt/lists/*
292247
0 commit comments