Skip to content

Commit

Permalink
update server image build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Dec 6, 2023
1 parent a4c667e commit 2b26e14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Reusable docker server image build workflow
on:
workflow_call:
inputs:
namespace_repository:
namespace-repository:
description: "The namespace and repository in the following format `namespace/repository` e.g. (flwr/base)."
required: true
type: string
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docker-base.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build docker base image

on:
push:
# paths:
# - src/docker/base
workflow_dispatch
# push:
# paths:
# - src/docker/base/*

permissions:
contents: read
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
matrix:
python-version: [3.11]
with:
namespace_repository: flwr/base
namespace-repository: flwr/base
file: src/docker/base
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: "Version of Flower base image."
required: false
type: string
default: "22.04"
default: "py3.11-ubuntu22.04"

permissions:
contents: read
Expand All @@ -20,7 +20,7 @@ jobs:
build-server-images:
uses: ./.github/workflows/_docker-build.yml
with:
namespace_repository: flwr/server
namespace-repository: flwr/server
file: src/docker/server
build-args: |
FLWR_VERSION=${{ github.event.inputs.flwr-version }}
Expand Down
4 changes: 2 additions & 2 deletions src/docker/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2023 Flower Labs GmbH. All Rights Reserved.

ARG BASE_IMAGE_VERSION=22.04
ARG BASE_IMAGE_VERSION=py3.11-ubuntu22.04
FROM flwr/base:$BASE_IMAGE_VERSION

WORKDIR /app
Expand All @@ -9,5 +9,5 @@ RUN python -m pip install -U --no-cache-dir flwr[rest]==${FLWR_VERSION}
ENTRYPOINT ["python", "-c", "from flwr.server import run_server; run_server()"]

# Test if Flower can be successfully installed and imported
FROM flwr/base:$BASE_VERSION
FROM flwr/base:$BASE_IMAGE_VERSION
RUN python -c "from flwr.server import run_server"

0 comments on commit 2b26e14

Please sign in to comment.