From 692ce61473a7d2a448076f42571bfc36c239ac00 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Thu, 20 Jun 2024 13:49:42 +0200 Subject: [PATCH 1/3] Fix publish with PR tag --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ce978c..e968db0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,6 +55,7 @@ jobs: # e.g. ghcr.io/cnts4sci/python images: ${{ inputs.registry }}/${{ github.repository_owner }}/${{ env.REPO_NAME }} tags: | + type=ref,event=pr type=edge,enable={{is_default_branch}} type=match,pattern=(\d{4}\.\d{4}(-.+)?),group=1 type=raw,value=v${{ env.VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} From 793d45e7f8d8ce05c4597c586b4a7ea302239337 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Thu, 20 Jun 2024 13:51:21 +0200 Subject: [PATCH 2/3] Add a symlink pip to pip3 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c24b82f..f1f49b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,8 @@ RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/python \ make -j10 && \ make install -RUN /opt/python/bin/python -m ensurepip --upgrade +RUN /opt/python/bin/python -m ensurepip --upgrade && \ + ln -s /opt/python/bin/pip3 /opt/python/bin/pip # Move binaries to a small image to reduce the size FROM runtime-base-image From a04e45458957c16ccfeedb8509ae2ea395286f72 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Thu, 20 Jun 2024 16:41:09 +0200 Subject: [PATCH 3/3] Add sqlite3 static dependency --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index f1f49b8..65d4ad8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,15 @@ RUN cd / && git clone https://github.com/python-cmake-buildsystem/python-cmake-b WORKDIR /python-build +# Build a static sqlite3 lib +RUN wget -c -O sqlite.tar.gz https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz && \ + mkdir -p sqlite && \ + tar xf sqlite.tar.gz -C sqlite --strip-components=1 && \ + cd sqlite && \ + ./configure CPPFLAGS="$CPPFLAGS -fPIC" -enable-static --disable-shared && \ + make && \ + make install + ARG PYTHON_VERSION RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/python \