Skip to content

Commit 501d85f

Browse files
authored
Modify HFL to start containers in detached mode for automation purposes (#177)
1 parent ae7fbde commit 501d85f

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

cczoo/horizontal_fl/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ Recommendation System and Image Classification.
8383

8484
```shell
8585
cd <horizontal_fl dir>
86-
sudo ./setup_azure_vm.sh
86+
./setup_azure_vm.sh
8787
```
8888

8989
After Intel SGX DCAP is setup, verify the Intel Architectural Enclave Service Manager is active (running)::
9090

9191
```shell
92-
sudo systemctl status aesmd
92+
systemctl status aesmd
9393
```
9494

9595
- EPC size: 64GB for image classification solution, 256GB for recommendation system solution
@@ -141,26 +141,31 @@ If running locally, please fill in the local PCCS server address in `<PCCS ip ad
141141

142142
```shell
143143
./start_container.sh ps0 <PCCS ip addr> <ubuntu/anolisos>
144+
docker exec -it ps0 bash
144145
cd recommendation_system
145146
test-sgx.sh ps0
146147
```
147148
```shell
148149
./start_container.sh worker0 <PCCS ip addr> <ubuntu/anolisos>
150+
docker exec -it worker0 bash
149151
cd recommendation_system
150152
test-sgx.sh worker0
151153
```
152154
```shell
153155
./start_container.sh worker1 <PCCS ip addr> <ubuntu/anolisos>
156+
docker exec -it worker1 bash
154157
cd recommendation_system
155158
test-sgx.sh worker1
156159
```
157160
```shell
158161
./start_container.sh worker2 <PCCS ip addr> <ubuntu/anolisos>
162+
docker exec -it worker2 bash
159163
cd recommendation_system
160164
test-sgx.sh worker2
161165
```
162166
```shell
163167
./start_container.sh worker3 <PCCS ip addr> <ubuntu/anolisos>
168+
docker exec -it worker3 bash
164169
cd recommendation_system
165170
test-sgx.sh worker3
166171
```
@@ -200,16 +205,19 @@ Start three containers (ps0, worker0, worker1) and run the script for the corres
200205
If running locally, please fill in the local PCCS server address in `<PCCS ip addr>`. If running in the cloud (except for Microsoft Azure), please modify the `PCCS server address` in the `sgx_default_qcnl.conf` file and fill in the PCCS address of the cloud and ignore the `<PCCS ip addr>` parameter.
201206
```shell
202207
./start_container.sh ps0 <PCCS ip addr> latest <ubuntu/anolisos>
208+
docker exec -it ps0 bash
203209
cd image_classification
204210
test-sgx.sh ps0
205211
```
206212
```shell
207213
./start_container.sh worker0 <PCCS ip addr> latest <ubuntu/anolisos>
214+
docker exec -it worker0 bash
208215
cd image_classification
209216
test-sgx.sh worker0
210217
```
211218
```shell
212219
./start_container.sh worker1 <PCCS ip addr> latest <ubuntu/anolisos>
220+
docker exec -it worker1 bash
213221
cd image_classification
214222
test-sgx.sh worker1
215223
```

cczoo/horizontal_fl/build_docker_image.sh

100644100755
File mode changed.

cczoo/horizontal_fl/start_container.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
#
23
# Copyright (c) 2022 Intel Corporation
34
#
@@ -13,7 +14,6 @@
1314
# See the License for the specific language governing permissions and
1415
# limitations under the License.
1516

16-
#!/bin/bash
1717
set -e
1818

1919
if [ -n "$1" ] ; then
@@ -35,7 +35,7 @@ else
3535
fi
3636

3737
if [ "$4" == "anolisos" ]; then
38-
docker run -it \
38+
docker run -itd \
3939
--restart=always \
4040
--cap-add=SYS_PTRACE \
4141
--security-opt seccomp=unconfined \
@@ -49,7 +49,7 @@ docker run -it \
4949
anolisos_horizontal_fl:${tag} \
5050
bash
5151
else
52-
docker run -it \
52+
docker run -itd \
5353
--restart=always \
5454
--cap-add=SYS_PTRACE \
5555
--security-opt seccomp=unconfined \
@@ -62,4 +62,4 @@ docker run -it \
6262
--add-host=pccs.service.com:${ip_addr} \
6363
horizontal_fl:${tag} \
6464
bash
65-
fi
65+
fi

0 commit comments

Comments
 (0)