Skip to content

Commit

Permalink
feat(framework:skip) Update Docker Compose distributed files for 1.…
Browse files Browse the repository at this point in the history
…13.0 (#4414)

Signed-off-by: Robert Steiner <[email protected]>
Co-authored-by: Chong Shen Ng <[email protected]>
  • Loading branch information
Robert-Steiner and chongshenng authored Nov 11, 2024
1 parent 33933d6 commit 92c0856
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/docker/distributed/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
superexec-certificates
superlink-certificates
server/state
1 change: 0 additions & 1 deletion src/docker/distributed/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ services:
build:
args:
SUPERLINK_IP: ${SUPERLINK_IP:-127.0.0.1}
SUPEREXEC_IP: ${SUPEREXEC_IP:-127.0.0.1}
12 changes: 6 additions & 6 deletions src/docker/distributed/client/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
supernode-1:
image: flwr/supernode:${FLWR_VERSION:-1.12.0}
image: flwr/supernode:${FLWR_VERSION:-nightly}
command:
- --superlink
- ${SUPERLINK_IP:-127.0.0.1}:9092
Expand All @@ -17,7 +17,7 @@ services:
target: /app/certificates/ca.crt

supernode-2:
image: flwr/supernode:${FLWR_VERSION:-1.12.0}
image: flwr/supernode:${FLWR_VERSION:-nightly}
command:
- --superlink
- ${SUPERLINK_IP:-127.0.0.1}:9092
Expand All @@ -36,7 +36,7 @@ services:
# uncomment to add another SuperNode
#
# supernode-3:
# image: flwr/supernode:${FLWR_VERSION:-1.12.0}
# image: flwr/supernode:${FLWR_VERSION:-nightly}
# command:
# - --superlink
# - ${SUPERLINK_IP:-127.0.0.1}:9092
Expand All @@ -56,7 +56,7 @@ services:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
FROM flwr/clientapp:${FLWR_VERSION:-nightly}
WORKDIR /app
COPY --chown=app:app pyproject.toml .
Expand All @@ -79,7 +79,7 @@ services:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
FROM flwr/clientapp:${FLWR_VERSION:-nightly}
WORKDIR /app
COPY --chown=app:app pyproject.toml .
Expand All @@ -104,7 +104,7 @@ services:
# build:
# context: ${PROJECT_DIR:-.}
# dockerfile_inline: |
# FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
# FROM flwr/clientapp:${FLWR_VERSION:-nightly}

# WORKDIR /app
# COPY --chown=app:app pyproject.toml .
Expand Down
38 changes: 13 additions & 25 deletions src/docker/distributed/server/compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
services:
superlink:
image: flwr/superlink:${FLWR_VERSION:-1.12.0}
image: flwr/superlink:${FLWR_VERSION:-nightly}
command:
- --executor
- flwr.superexec.deployment:executor
- --isolation
- process
- --ssl-ca-certfile=certificates/ca.crt
- --ssl-certfile=certificates/server.pem
- --ssl-keyfile=certificates/server.key
Expand All @@ -17,38 +21,28 @@ services:
target: /app/certificates/server.key
ports:
- 9092:9092
- 9093:9093

superexec:
serverapp:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/superexec:${FLWR_VERSION:-1.12.0}
FROM flwr/serverapp:${FLWR_VERSION:-nightly}
WORKDIR /app
COPY --chown=app:app pyproject.toml .
RUN sed -i 's/.*flwr\[simulation\].*//' pyproject.toml \
&& python -m pip install -U --no-cache-dir .
ENTRYPOINT ["flower-superexec"]
ENTRYPOINT ["flwr-serverapp"]
command:
- --executor
- flwr.superexec.deployment:executor
- --executor-config
- superlink="superlink:9091" root-certificates="certificates/superlink-ca.crt"
- --ssl-ca-certfile=certificates/ca.crt
- --ssl-certfile=certificates/server.pem
- --ssl-keyfile=certificates/server.key
- --superlink
- superlink:9091
- --root-certificates
- certificates/ca.crt
secrets:
- source: superlink-ca-certfile
target: /app/certificates/superlink-ca.crt
- source: superexec-ca-certfile
target: /app/certificates/ca.crt
- source: superexec-certfile
target: /app/certificates/server.pem
- source: superexec-keyfile
target: /app/certificates/server.key
ports:
- 9093:9093
depends_on:
- superlink

Expand All @@ -59,9 +53,3 @@ secrets:
file: ../superlink-certificates/server.pem
superlink-keyfile:
file: ../superlink-certificates/server.key
superexec-ca-certfile:
file: ../superexec-certificates/ca.crt
superexec-certfile:
file: ../superexec-certificates/server.pem
superexec-keyfile:
file: ../superexec-certificates/server.key

0 comments on commit 92c0856

Please sign in to comment.