Skip to content

Commit 7ae8721

Browse files
committed
update version of python for the docker image (#2434)
* update version of python for the docker image * fix syntax error * tag docker images with the python and debian version used
1 parent 32ac379 commit 7ae8721

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/_release_docker.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ on:
1515
type: boolean
1616
default: false
1717
python:
18-
type: boolean
19-
description: If selected will build the python version of the image
20-
default: false
18+
type: string
19+
description: If set, will build the python image using this as the tag for the base python image, e.g. '3.14.2-slim-trixie'
2120
workflow_call:
2221
inputs: *inputs
2322

24-
2523
permissions:
2624
contents: read
2725

@@ -52,7 +50,7 @@ jobs:
5250
5351
- name: Set dockerfile path and cache image
5452
run: |
55-
if [ "${{ inputs.python }}" = "true" ]; then
53+
if [ -n "${{ inputs.python }}"]; then
5654
echo "DOCKERFILE_PATH=python.Dockerfile" >> $GITHUB_ENV
5755
echo "CACHE_IMAGE=${{ env.REGISTRY_IMAGE }}:buildcache-python-${{ env.PLATFORM_PAIR }}" >> $GITHUB_ENV
5856
else
@@ -81,7 +79,9 @@ jobs:
8179
uses: docker/build-push-action@v6
8280
with:
8381
context: .
84-
build-args: RUST_VERSION=${{ env.RUST_VERSION }}
82+
build-args: |
83+
RUST_VERSION=${{ env.RUST_VERSION }}
84+
BASE_PYTHON_IMAGE_TAG=${{ inputs.python }}
8585
file: ${{ env.DOCKERFILE_PATH }}
8686
platforms: ${{ matrix.platform }}
8787
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release_auto.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: 🚀🦀🐍🐳🐙 Publish all packages to crates.io, PyPi, Docker Hub & Github
2+
3+
env:
4+
PYTHON_VERSION: 3.14.2
5+
DEBIAN_VERSION: trixie
6+
27
on:
38
workflow_dispatch:
49
inputs:
@@ -15,7 +20,7 @@ jobs:
1520
read-raphtory-version:
1621
runs-on: ubuntu-latest
1722
outputs:
18-
version: ${{ steps.version.outputs.version }}
23+
version: ${{ steps.version.outputs.version }}
1924
steps:
2025
- uses: actions/checkout@v4
2126
with:
@@ -62,7 +67,8 @@ jobs:
6267
base: ${{ inputs.base }}
6368
dry_run: ${{ inputs.dry_run == true }}
6469
tag: |
70+
${{ needs.read-raphtory-version.outputs.version }}-python${{ env.PYTHON_VERSION }}-${{ env.DEBIAN_VERSION }}
6571
${{ needs.read-raphtory-version.outputs.version }}-python
6672
latest-python
67-
python: true
73+
python: ${{ env.PYTHON_VERSION }}-slim-${{ env.DEBIAN_VERSION }}
6874
secrets: inherit

python.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG PYTHON_VERSION=3.13.5
21
ARG RUST_VERSION=1.86.0
2+
ARG BASE_PYTHON_IMAGE_TAG
33

44
FROM rust:${RUST_VERSION} AS build
55
ARG PYTHON_VERSION
@@ -15,7 +15,7 @@ RUN pip install maturin==1.8.3 patchelf==0.17.2.2
1515
COPY . .
1616
RUN cd python && maturin build --release
1717

18-
FROM python:${PYTHON_VERSION}-slim
18+
FROM python:${BASE_PYTHON_IMAGE_TAG}
1919
ARG PYTHON_VERSION
2020
WORKDIR /var/lib/raphtory
2121
COPY --from=build /app/target/wheels/*.whl /

0 commit comments

Comments
 (0)