Skip to content

Commit

Permalink
Merge branch 'main' into reformatted-fedbn
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq authored Nov 16, 2023
2 parents c8eb179 + 7ae14a2 commit 272d86e
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 100 deletions.
6 changes: 0 additions & 6 deletions src/docker/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions src/docker/build.sh

This file was deleted.

8 changes: 0 additions & 8 deletions src/docker/default.Dockerfile

This file was deleted.

49 changes: 49 additions & 0 deletions src/docker/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2023 Flower Labs GmbH. All Rights Reserved.

FROM ubuntu:22.04 as base

ENV DEBIAN_FRONTEND noninteractive

# Install system dependencies
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
clang-format git unzip ca-certificates openssh-client liblzma-dev \
build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev wget\
libsqlite3-dev curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev \
libxmlsec1-dev libffi-dev liblzma-dev \
&& rm -rf /var/lib/apt/lists/*

# Install PyEnv and Python
ARG PYTHON_VERSION
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
RUN pyenv install ${PYTHON_VERSION} \
&& pyenv global ${PYTHON_VERSION} \
&& pyenv rehash

# Install specific version of pip
ARG PIP_VERSION
RUN python -m pip install pip==$PIP_VERSION

# Install specific version of setuptools
ARG SETUPTOOLS_VERSION
RUN python -m pip install setuptools==$SETUPTOOLS_VERSION

# Install poetry as all examples use it and therefore it should be available for custom images
ARG POETRY_VERSION
RUN curl -sSL https://install.python-poetry.org | python3 - --version ${POETRY_VERSION}
ENV PATH /root/.local/bin:$PATH
RUN poetry config virtualenvs.create false

# Server image
FROM base as server

WORKDIR /app
ARG FLWR_VERSION
RUN python -m pip install -U flwr[rest]==${FLWR_VERSION}
ENTRYPOINT ["python", "-c", "from flwr.server import run_server\nrun_server()"]

# Test if Flower can be successfully installed and imported
FROM server as test
RUN python -c "from flwr.server import run_server"
27 changes: 0 additions & 27 deletions src/docker/ssh_key

This file was deleted.

1 change: 0 additions & 1 deletion src/docker/ssh_key.pub

This file was deleted.

32 changes: 0 additions & 32 deletions src/docker/sshd.Dockerfile

This file was deleted.

0 comments on commit 272d86e

Please sign in to comment.