Skip to content

Commit

Permalink
Merge pull request #4 from cnts4sci/fix-3-pip-and-2-sqlite3
Browse files Browse the repository at this point in the history
Fix 3 pip and 2 sqlite3
  • Loading branch information
unkcpz authored Jun 20, 2024
2 parents a7cbf7e + a04e454 commit 3fa04dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -29,7 +38,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
Expand Down

0 comments on commit 3fa04dc

Please sign in to comment.