Skip to content

Commit 49d89bc

Browse files
authored
Merge pull request #55 from OpenMined/feature/aries-fl
Feature/aries fl
2 parents 2ccf700 + f341399 commit 49d89bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+10850
-39
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ libs/om-aries-controller/demo/bob/image_received.png
1313
.vscode/
1414
# exception to the rule
1515
!libs/om-aries-controller/demo/bob/received_files/.gitkeep
16+
17+
**/model.pt
18+
**/trained_model.pt
19+
**/untrained_model.pt

dockerfiles/controllers/Dockerfile.attachmentcontroller

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ RUN apt-get update && apt-get install -y gcc
99
# RUN conda install jupyter notebook=5.7.8
1010
RUN conda install jupyter notebook=6.1.5
1111

12-
1312
ADD libs/attachment-controller attachment-controller
1413

1514

projects/aries-fl/.DS_Store

6 KB
Binary file not shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM continuumio/miniconda3
2+
3+
ENV WORKSPACE /workspace
4+
5+
ARG jupyter_port
6+
ENV env_jupyter_port=jupyter_port
7+
8+
# Setup workspace environment
9+
RUN apt-get update && apt-get install -y gcc
10+
# RUN conda install jupyter notebook=5.7.8
11+
RUN conda install jupyter notebook=6.1.5
12+
13+
14+
ADD projects/aries-fl/requirements.txt .
15+
16+
#
17+
# .
18+
RUN pip install -r requirements.txt
19+
20+
#RUN pip install aiohttp
21+
#RUN export PYTHONPATH="$PYTHONPATH:/aries_basic_controller"
22+
#ENV PYTHONPATH "${PYTHONPATH}:/aries_basic_controller"
23+
#RUN export JUPYTER_PATH="$JUPYTER_PATH:/aries_basic_controller"
24+
# Create jupyter notebook workspace
25+
#RUN mkdir $WORKSPACE
26+
WORKDIR $WORKSPACE
27+
28+
29+
# Make the image start the jupyer notebook
30+
COPY scripts/jupyter-entrypoint.sh /entrypoint.sh
31+
RUN chmod +x /entrypoint.sh
32+
33+
34+
35+
36+
37+
# ENTRYPOINT ["/entrypoint.sh", "$env_jupyter_port"]
38+
ENTRYPOINT ["/entrypoint.sh", "8888"]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM continuumio/miniconda3
2+
3+
ENV WORKSPACE /workspace
4+
5+
ARG jupyter_port
6+
ENV env_jupyter_port=jupyter_port
7+
8+
# Setup workspace environment
9+
RUN apt-get update && apt-get install -y gcc
10+
# RUN conda install jupyter notebook=5.7.8
11+
RUN conda install jupyter notebook=6.1.5
12+
13+
14+
ADD projects/aries-fl/requirements.txt .
15+
16+
#
17+
# .
18+
RUN pip install -r requirements.txt
19+
20+
#RUN pip install aiohttp
21+
#RUN export PYTHONPATH="$PYTHONPATH:/aries_basic_controller"
22+
#ENV PYTHONPATH "${PYTHONPATH}:/aries_basic_controller"
23+
#RUN export JUPYTER_PATH="$JUPYTER_PATH:/aries_basic_controller"
24+
# Create jupyter notebook workspace
25+
#RUN mkdir $WORKSPACE
26+
WORKDIR $WORKSPACE
27+
28+
29+
# Make the image start the jupyer notebook
30+
COPY scripts/jupyter-entrypoint.sh /entrypoint.sh
31+
RUN chmod +x /entrypoint.sh
32+
33+
34+
35+
36+
37+
# ENTRYPOINT ["/entrypoint.sh", "$env_jupyter_port"]
38+
ENTRYPOINT ["/entrypoint.sh", "8888"]

projects/aries-fl/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Federated Learning over DIDComm
2+
3+
4+
5+
# Guide
6+
7+
![Full Aries Scenario](figures/initialidea.png)
8+
9+
10+
11+
# Created by
12+
13+
Will Abramson (wip-abramson)
14+
Adam James Hall (H4LL)
15+
Pavlos Papadopoulos (pavlos-p)

projects/aries-fl/docker-compose.yml

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
version: "3"
2+
services:
3+
nhstrust-agent:
4+
build:
5+
context: ../../
6+
dockerfile: dockerfiles/agents/Dockerfile
7+
environment:
8+
- ADMIN_URL=http://nhstrust-agent:${NHSTRUST_ADMIN_PORT}
9+
- AGENT_NAME=${NHSTRUST_AGENT_NAME}
10+
- ADMIN_PORT=${NHSTRUST_ADMIN_PORT}
11+
- HTTP_PORT=${NHSTRUST_HTTP_PORT}
12+
- WEBHOOK_URL=${NHSTRUST_WEBHOOK_URL}
13+
- AGENT_ENDPOINT=${NHSTRUST_AGENT_ENDPOINT}
14+
- WALLET_SEED=${NHSTRUST_WALLET_SEED}
15+
- WALLET_NAME=${NHSTRUST_WALLET_NAME}
16+
- WALLET_KEY=${NHSTRUST_WALLET_KEY}
17+
- WALLET_TYPE=${WALLET_TYPE}
18+
- ACAPY_ADMIN_INSECURE_MODE=true
19+
- GENESIS_URL=${GENESIS_URL}
20+
ports:
21+
- ${NHSTRUST_HTTP_PORT}:${NHSTRUST_HTTP_PORT}
22+
- ${NHSTRUST_ADMIN_PORT}:${NHSTRUST_ADMIN_PORT}
23+
networks:
24+
- indy_demo
25+
entrypoint: /bin/bash
26+
command: [
27+
"-c",
28+
"sleep 3;
29+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
30+
sleep 20; \
31+
aca-py start --arg-file /tmp/agent_conf.yml"
32+
]
33+
nhstrust-notebook:
34+
build:
35+
context: ../../
36+
dockerfile: dockerfiles/controllers/Dockerfile.basiccontroller
37+
args:
38+
- jupyter_port=${NHSTRUST_JUPYTER_PORT}
39+
depends_on:
40+
- nhstrust-agent
41+
networks:
42+
- indy_demo
43+
volumes:
44+
- ${PWD}/notebooks/nhs_trust:/workspace
45+
ports:
46+
- ${NHSTRUST_JUPYTER_PORT}:8888
47+
- ${NHSTRUST_WEBHOOK_PORT}:${NHSTRUST_WEBHOOK_PORT}
48+
regulator-agent:
49+
build:
50+
context: ../../
51+
dockerfile: dockerfiles/agents/Dockerfile
52+
environment:
53+
- ADMIN_URL=http://regulator-agent:${REGULATOR_ADMIN_PORT}
54+
- AGENT_NAME=${REGULATOR_AGENT_NAME}
55+
- ADMIN_PORT=${REGULATOR_ADMIN_PORT}
56+
- HTTP_PORT=${REGULATOR_HTTP_PORT}
57+
- WEBHOOK_URL=${REGULATOR_WEBHOOK_URL}
58+
- AGENT_ENDPOINT=${REGULATOR_AGENT_ENDPOINT}
59+
- WALLET_SEED=${REGULATOR_WALLET_SEED}
60+
- WALLET_NAME=${REGULATOR_WALLET_NAME}
61+
- WALLET_KEY=${REGULATOR_WALLET_KEY}
62+
- WALLET_TYPE=${WALLET_TYPE}
63+
- ACAPY_ADMIN_INSECURE_MODE=true
64+
- GENESIS_URL=${GENESIS_URL}
65+
ports:
66+
- ${REGULATOR_HTTP_PORT}:${REGULATOR_HTTP_PORT}
67+
- ${REGULATOR_ADMIN_PORT}:${REGULATOR_ADMIN_PORT}
68+
networks:
69+
- indy_demo
70+
entrypoint: /bin/bash
71+
command: [
72+
"-c",
73+
"sleep 3;
74+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
75+
sleep 20; \
76+
aca-py start --arg-file /tmp/agent_conf.yml"
77+
]
78+
regulator-notebook:
79+
build:
80+
context: ../../
81+
dockerfile: dockerfiles/controllers/Dockerfile.basiccontroller
82+
args:
83+
- jupyter_port=${REGULATOR_JUPYTER_PORT}
84+
depends_on:
85+
- regulator-agent
86+
networks:
87+
- indy_demo
88+
volumes:
89+
- ./notebooks/regulator:/workspace
90+
ports:
91+
- "${REGULATOR_JUPYTER_PORT}:8888"
92+
- ${REGULATOR_WEBHOOK_PORT}:${REGULATOR_WEBHOOK_PORT}
93+
researcher-agent:
94+
build:
95+
context: ../../
96+
dockerfile: dockerfiles/agents/Dockerfile
97+
environment:
98+
- ADMIN_URL=http://researcher-agent:${RESEARCHER_ADMIN_PORT}
99+
- AGENT_NAME=${RESEARCHER_AGENT_NAME}
100+
- ADMIN_PORT=${RESEARCHER_ADMIN_PORT}
101+
- HTTP_PORT=${RESEARCHER_HTTP_PORT}
102+
- WEBHOOK_URL=${RESEARCHER_WEBHOOK_URL}
103+
- AGENT_ENDPOINT=${RESEARCHER_AGENT_ENDPOINT}
104+
- WALLET_SEED=${RESEARCHER_WALLET_SEED}
105+
- WALLET_NAME=${RESEARCHER_WALLET_NAME}
106+
- WALLET_KEY=${RESEARCHER_WALLET_KEY}
107+
- WALLET_TYPE=${WALLET_TYPE}
108+
- ACAPY_ADMIN_INSECURE_MODE=true
109+
- GENESIS_URL=${GENESIS_URL}
110+
ports:
111+
- ${RESEARCHER_HTTP_PORT}:${RESEARCHER_HTTP_PORT}
112+
- ${RESEARCHER_ADMIN_PORT}:${RESEARCHER_ADMIN_PORT}
113+
networks:
114+
- indy_demo
115+
entrypoint: /bin/bash
116+
command: [
117+
"-c",
118+
"sleep 3;
119+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
120+
sleep 20; \
121+
aca-py start --arg-file /tmp/agent_conf.yml"
122+
]
123+
researcher-notebook:
124+
build:
125+
context: ../../
126+
dockerfile: projects/aries-fl/Dockerfile.ppmlcontroller
127+
args:
128+
- jupyter_port=${RESEARCHER_JUPYTER_PORT}
129+
depends_on:
130+
- researcher-agent
131+
networks:
132+
- indy_demo
133+
volumes:
134+
- ./notebooks/researcher:/workspace
135+
ports:
136+
- "${RESEARCHER_JUPYTER_PORT}:8888"
137+
- ${RESEARCHER_WEBHOOK_PORT}:${RESEARCHER_WEBHOOK_PORT}
138+
hospital1-agent:
139+
build:
140+
context: ../../
141+
dockerfile: dockerfiles/agents/Dockerfile
142+
environment:
143+
- ADMIN_URL=http://hospital1-agent:${HOSPITAL1_ADMIN_PORT}
144+
- AGENT_NAME=${HOSPITAL1_AGENT_NAME}
145+
- ADMIN_PORT=${HOSPITAL1_ADMIN_PORT}
146+
- HTTP_PORT=${HOSPITAL1_HTTP_PORT}
147+
- WEBHOOK_URL=${HOSPITAL1_WEBHOOK_URL}
148+
- AGENT_ENDPOINT=${HOSPITAL1_AGENT_ENDPOINT}
149+
- WALLET_SEED=${HOSPITAL1_WALLET_SEED}
150+
- WALLET_NAME=${HOSPITAL1_WALLET_NAME}
151+
- WALLET_KEY=${HOSPITAL1_WALLET_KEY}
152+
- WALLET_TYPE=${WALLET_TYPE}
153+
- ACAPY_ADMIN_INSECURE_MODE=true
154+
- GENESIS_URL=${GENESIS_URL}
155+
ports:
156+
- ${HOSPITAL1_HTTP_PORT}:${HOSPITAL1_HTTP_PORT}
157+
- ${HOSPITAL1_ADMIN_PORT}:${HOSPITAL1_ADMIN_PORT}
158+
networks:
159+
- indy_demo
160+
entrypoint: /bin/bash
161+
command: [
162+
"-c",
163+
"sleep 3;
164+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
165+
sleep 20; \
166+
aca-py start --arg-file /tmp/agent_conf.yml"
167+
]
168+
hospital1-notebook:
169+
build:
170+
context: ../../
171+
dockerfile: projects/aries-fl/Dockerfile.ppmlcontroller
172+
args:
173+
- jupyter_port=${HOSPITAL1_JUPYTER_PORT}
174+
depends_on:
175+
- hospital1-agent
176+
networks:
177+
- indy_demo
178+
volumes:
179+
- ./notebooks/hospital1:/workspace
180+
- ./hospital:/workspace/hospital
181+
ports:
182+
- "${HOSPITAL1_JUPYTER_PORT}:8888"
183+
- ${HOSPITAL1_WEBHOOK_PORT}:${HOSPITAL1_WEBHOOK_PORT}
184+
hospital2-agent:
185+
build:
186+
context: ../../
187+
dockerfile: dockerfiles/agents/Dockerfile
188+
environment:
189+
- ADMIN_URL=http://hospital2-agent:${HOSPITAL2_ADMIN_PORT}
190+
- AGENT_NAME=${HOSPITAL2_AGENT_NAME}
191+
- ADMIN_PORT=${HOSPITAL2_ADMIN_PORT}
192+
- HTTP_PORT=${HOSPITAL2_HTTP_PORT}
193+
- WEBHOOK_URL=${HOSPITAL2_WEBHOOK_URL}
194+
- AGENT_ENDPOINT=${HOSPITAL2_AGENT_ENDPOINT}
195+
- WALLET_SEED=${HOSPITAL2_WALLET_SEED}
196+
- WALLET_NAME=${HOSPITAL2_WALLET_NAME}
197+
- WALLET_KEY=${HOSPITAL2_WALLET_KEY}
198+
- WALLET_TYPE=${WALLET_TYPE}
199+
- ACAPY_ADMIN_INSECURE_MODE=true
200+
- GENESIS_URL=${GENESIS_URL}
201+
ports:
202+
- ${HOSPITAL2_HTTP_PORT}:${HOSPITAL2_HTTP_PORT}
203+
- ${HOSPITAL2_ADMIN_PORT}:${HOSPITAL2_ADMIN_PORT}
204+
networks:
205+
- indy_demo
206+
entrypoint: /bin/bash
207+
command: [
208+
"-c",
209+
"sleep 3;
210+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
211+
sleep 20; \
212+
aca-py start --arg-file /tmp/agent_conf.yml"
213+
]
214+
hospital2-notebook:
215+
build:
216+
context: ../../
217+
dockerfile: projects/aries-fl/Dockerfile.ppmlcontroller
218+
args:
219+
- jupyter_port=${HOSPITAL2_JUPYTER_PORT}
220+
depends_on:
221+
- hospital2-agent
222+
networks:
223+
- indy_demo
224+
volumes:
225+
- ./notebooks/hospital2:/workspace
226+
- ./hospital:/workspace/hospital
227+
ports:
228+
- "${HOSPITAL2_JUPYTER_PORT}:8888"
229+
- ${HOSPITAL2_WEBHOOK_PORT}:${HOSPITAL2_WEBHOOK_PORT}
230+
hospital3-agent:
231+
build:
232+
context: ../../
233+
dockerfile: dockerfiles/agents/Dockerfile
234+
environment:
235+
- ADMIN_URL=http://hospital3-agent:${HOSPITAL3_ADMIN_PORT}
236+
- AGENT_NAME=${HOSPITAL3_AGENT_NAME}
237+
- ADMIN_PORT=${HOSPITAL3_ADMIN_PORT}
238+
- HTTP_PORT=${HOSPITAL3_HTTP_PORT}
239+
- WEBHOOK_URL=${HOSPITAL3_WEBHOOK_URL}
240+
- AGENT_ENDPOINT=${HOSPITAL3_AGENT_ENDPOINT}
241+
- WALLET_SEED=${HOSPITAL3_WALLET_SEED}
242+
- WALLET_NAME=${HOSPITAL3_WALLET_NAME}
243+
- WALLET_KEY=${HOSPITAL3_WALLET_KEY}
244+
- WALLET_TYPE=${WALLET_TYPE}
245+
- ACAPY_ADMIN_INSECURE_MODE=true
246+
- GENESIS_URL=${GENESIS_URL}
247+
ports:
248+
- ${HOSPITAL3_HTTP_PORT}:${HOSPITAL3_HTTP_PORT}
249+
- ${HOSPITAL3_ADMIN_PORT}:${HOSPITAL3_ADMIN_PORT}
250+
networks:
251+
- indy_demo
252+
entrypoint: /bin/bash
253+
command: [
254+
"-c",
255+
"sleep 3;
256+
python3 scripts/parse_yml_env_variables.py -c ./configuration/aries-args-basic.yaml; \
257+
sleep 20; \
258+
aca-py start --arg-file /tmp/agent_conf.yml"
259+
]
260+
hospital3-notebook:
261+
build:
262+
context: ../../
263+
dockerfile: projects/aries-fl/Dockerfile.ppmlcontroller
264+
args:
265+
- jupyter_port=${HOSPITAL3_JUPYTER_PORT}
266+
depends_on:
267+
- hospital3-agent
268+
networks:
269+
- indy_demo
270+
volumes:
271+
- ./notebooks/hospital3:/workspace
272+
- ./hospital:/workspace/hospital
273+
ports:
274+
- "${HOSPITAL3_JUPYTER_PORT}:8888"
275+
- ${HOSPITAL3_WEBHOOK_PORT}:${HOSPITAL3_WEBHOOK_PORT}
276+
277+
networks:
278+
indy_demo:
279+
56.3 KB
Loading
448 KB
Loading

0 commit comments

Comments
 (0)