Skip to content

Add base image for other python versions (#2700) #1

Add base image for other python versions (#2700)

Add base image for other python versions (#2700) #1

Workflow file for this run

name: Build docker base image
on:
push:
branches: ["main"]
paths:
- "src/docker/base/**"
- ".github/workflows/docker-base.yml"
# re-run if something chnages in the bootstrap action (e.g. version of the dependencies)
- ".github/actions/bootstrap/action.yml"
- ".github/workflows/_docker-build.yml"
permissions:
contents: read
env:
DEFAULT_UBUNTU: 22.04
jobs:
parameters:
name: Collect build parameters
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
pip-version: ${{ steps.versions.outputs.pip-version }}
setuptools-version: ${{ steps.versions.outputs.setuptools-version }}
ubuntu-version: ${{ steps.versions.outputs.ubuntu-version }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/bootstrap
id: bootstrap
- id: versions
run: |
echo "pip-version=${{ steps.bootstrap.outputs.pip-version }}" >> "$GITHUB_OUTPUT"
echo "setuptools-version=${{ steps.bootstrap.outputs.setuptools-version }}" >> "$GITHUB_OUTPUT"
echo "ubuntu-version=${{ env.DEFAULT_UBUNTU }}" >> "$GITHUB_OUTPUT"
build-base-images:
name: Build images
uses: ./.github/workflows/_docker-build.yml
needs: parameters
strategy:
fail-fast: true
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
with:
namespace-repository: flwr/base
file-dir: src/docker/base
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
PIP_VERSION=${{ needs.parameters.outputs.pip-version }}
SETUPTOOLS_VERSION=${{ needs.parameters.outputs.setuptools-version }}
UBUNTU_VERSION=${{ needs.parameters.outputs.ubuntu-version }}
tags: py${{ matrix.python-version }}-ubuntu${{ needs.parameters.outputs.ubuntu-version }}
secrets:
dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}