Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve the pdf-export #360

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ docker-run: docker-build ## Build and Run docker image for the Frisbee controlle
##@ Deployment
docker-push: docker-build ## Push the latest docker image for Frisbee controller.
@echo "===> Tag ${IMG} as frisbee-operator:latest <==="
docker tag ${IMG} $(IMAGE_TAG_BASE)/frisbee-operator:${FrisbeeVersion}
docker tag ${IMG} $(IMAGE_TAG_BASE)/frisbee-operator:latest
docker tag ${IMG} ${IMAGE_TAG_BASE}/frisbee-operator:${FrisbeeVersion}
docker tag ${IMG} ${IMAGE_TAG_BASE}/frisbee-operator:latest

@echo "===> Push frisbee operator ${FrisbeeVersion} as latest <==="
docker push $(IMAGE_TAG_BASE)/frisbee-operator:${FrisbeeVersion}
docker push $(IMAGE_TAG_BASE)/frisbee-operator:latest
docker push ${IMAGE_TAG_BASE}/frisbee-operator:${FrisbeeVersion}
docker push ${IMAGE_TAG_BASE}/frisbee-operator:latest


install: generate ## Deploy platform to the K8s cluster specified in ~/.kube/config.
Expand Down
3 changes: 3 additions & 0 deletions charts/federated-learning/flower-custom/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore local charts (used for testing)
charts
Chart.lock
29 changes: 29 additions & 0 deletions charts/federated-learning/flower-custom/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

# Docs
*.md

# Ignore any figures used in the README.md
examples/README.assets
31 changes: 31 additions & 0 deletions charts/federated-learning/flower-custom/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
apiVersion: v2
name: flower
description: Flower - A Friendly Federated Learning Framework

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

maintainers:
- name: Fotis Nikolaidis
email: [email protected]
url: https://www.linkedin.com/in/fotis-nikolaidis-444a6634/


# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.0
5 changes: 5 additions & 0 deletions charts/federated-learning/flower-custom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Flower



## Parameters
Empty file.
13 changes: 13 additions & 0 deletions charts/federated-learning/flower/containers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


== Advanced Pytorch ==
``` shell
docker build -t icsforth/advanced_pytorch -f advanced_pytorch.Dockerfile .
docker push icsforth/advanced_pytorch
```

== Advanced Tensorflow ==
``` shell
docker build -t icsforth/advanced_tensorflow -f advanced_tensorflow.Dockerfile .
docker push icsforth/advanced_tensorflow
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build container for the advanced_pytorch example according to the following instructions:
# https://github.com/adap/flower/tree/main/examples/advanced_pytorch
FROM bitnami/pytorch

USER root

RUN apt-get update && apt-get install -y git

# Install dependencies
RUN pip install poetry

# Clone the example project
RUN git clone --depth=1 https://github.com/adap/flower.git \
&& mv flower/examples/advanced_pytorch . \
&& rm -rf flower

WORKDIR ./advanced_pytorch

# Download Flower dependencies
RUN poetry install

# Download the EfficientNetB0 model
RUN python -c "import torch; torch.hub.load( \
'NVIDIA/DeepLearningExamples:torchhub', \
'nvidia_efficientnet_b0', pretrained=True)"

# Download the CIFAR-10 dataset
RUN python -c "from torchvision.datasets import CIFAR10; CIFAR10('./dataset', download=True)"

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Build container for the advanced_pytorch example according to the following instructions:
# https://github.com/adap/flower/tree/main/examples/advanced_tensorflow
FROM tensorflow/tensorflow

USER root

RUN apt-get update && apt-get install -y git

# Install dependencies
RUN pip install poetry

# Clone the example project
RUN git clone --depth=1 https://github.com/adap/flower.git \
&& mv flower/examples/advanced_tensorflow . \
&& rm -rf flower

WORKDIR ./advanced_tensorflow

# Download Flower dependencies
RUN poetry install

# Download the CIFAR-10 dataset
RUN python -c "import tensorflow as tf; tf.keras.datasets.cifar10.load_data()"
20 changes: 20 additions & 0 deletions charts/federated-learning/flower/examples/advanced_pytorch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: frisbee.dev/v1alpha1
kind: Scenario
metadata:
name: advanced-pytoch
spec:
actions:
# Run the default script
- action: Service
name: script
service:
templateRef: flower.advanced-pytorch.standalone

# Teardown
- action: Delete
name: teardown
depends: { success: [ script ] }
delete:
jobs: []

20 changes: 20 additions & 0 deletions charts/federated-learning/flower/examples/advanced_tensorflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: frisbee.dev/v1alpha1
kind: Scenario
metadata:
name: advanced-tensorflow
spec:
actions:
# Run the default script
- action: Service
name: script
service:
templateRef: flower.advanced-tensorflow.standalone

# Teardown
- action: Delete
name: teardown
depends: { success: [ script ] }
delete:
jobs: []

20 changes: 20 additions & 0 deletions charts/federated-learning/flower/templates/advanced_pytorch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: frisbee.dev/v1alpha1
kind: Template
metadata:
name: flower.advanced-pytorch.standalone
spec:
service:
decorators:
telemetry: [ system.telemetry.agent]

containers:
- name: app
image: icsforth/advanced_pytorch
command: ["/bin/sh", "-c"]
args:
- | # Script
set -eum
cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup

poetry run ./run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
apiVersion: frisbee.dev/v1alpha1
kind: Template
metadata:
name: flower.advanced-tensorflow.standalone
spec:
service:
decorators:
telemetry: [ system.telemetry.agent]

containers:
- name: app
image: icsforth/advanced_tensorflow
command: ["/bin/sh", "-c"]
args:
- | # Script
set -eum
cut -d ' ' -f 4 /proc/self/stat > /dev/shm/app # Sidecar: use it for entering the cgroup

poetry run ./run.sh
1 change: 0 additions & 1 deletion charts/system/templates/telemetry/agent/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ spec:
# Tap into the cgroup of the main container, and mount it locally
nsenter -t $(cat /dev/shm/app) -C -- mount -t cgroup2 none /sys/fs/cgroup


cadvisor --port=9442 \
--docker_only=true \
--store_container_labels=false \
Expand Down
Loading