-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor workspace export; fmt Signed-off-by: Shah, Karan <[email protected]> * Refactor `fx workspace export` and `fx workspace dockerize` Signed-off-by: Shah, Karan <[email protected]> * Eliminate base image build step Signed-off-by: Shah, Karan <[email protected]> * mark flag Signed-off-by: Shah, Karan <[email protected]> * Fuse build layer Signed-off-by: Shah, Karan <[email protected]> * Add --no-cache option; export ws first Signed-off-by: Shah, Karan <[email protected]> * Use OpenFL git source instead of local Signed-off-by: Shah, Karan <[email protected]> * Generic username, disable pip cache Signed-off-by: Shah, Karan <[email protected]> * configurable source/branch with default Signed-off-by: Shah, Karan <[email protected]> * Configurable one-liner revision flag Signed-off-by: Shah, Karan <[email protected]> * Readable tag instead of commit hash Signed-off-by: Shah, Karan <[email protected]> * Test GITHUB_HEAD_REF for CI Signed-off-by: Shah, Karan <[email protected]> * another try Signed-off-by: Shah, Karan <[email protected]> --------- Signed-off-by: Shah, Karan <[email protected]>
- Loading branch information
1 parent
1b051b0
commit 85c5efc
Showing
4 changed files
with
180 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ | |
# SPDX-License-Identifier: Apache-2.0 | ||
# ------------------------------------ | ||
# OpenFL Base Image | ||
# $> docker build . -t openfl -f Dockerfile.base [--build-arg OPENFL_REVISION=GIT_URL@COMMIT_ID] | ||
# ------------------------------------ | ||
FROM ubuntu:22.04 as base | ||
FROM ubuntu:22.04 AS base | ||
|
||
# Configure network proxy, if required, in ~/.docker/config.json | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
@@ -13,28 +14,26 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ | ||
apt-get update && \ | ||
apt-get install -y \ | ||
git \ | ||
python3-pip \ | ||
python3.10-dev \ | ||
ca-certificates \ | ||
build-essential \ | ||
git \ | ||
--no-install-recommends && \ | ||
apt-get purge -y linux-libc-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN apt-get purge -y linux-libc-dev | ||
|
||
# Create an unprivileged user. | ||
RUN groupadd -g 1001 default && \ | ||
useradd -m -u 1001 -g default openfl | ||
USER openfl | ||
useradd -m -u 1001 -g default user | ||
USER user | ||
WORKDIR /home/user | ||
ENV PATH=/home/user/.local/bin:$PATH | ||
|
||
# Install OpenFL. | ||
WORKDIR /home/openfl | ||
COPY --chown=openfl:default . . | ||
ENV PATH=/home/openfl/.local/bin:$PATH | ||
ARG OPENFL_REVISION=https://github.com/securefederatedai/[email protected] | ||
RUN pip install --no-cache-dir -U pip setuptools wheel && \ | ||
pip install --no-cache-dir -e . | ||
|
||
# Download thirdparty licenses. | ||
RUN INSTALL_SOURCES=yes /home/openfl/openfl-docker/licenses.sh | ||
pip install --no-cache-dir git+${OPENFL_REVISION} && \ | ||
INSTALL_SOURCES=yes /home/user/.local/lib/python3.10/site-packages/openfl-docker/licenses.sh | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.