Skip to content

Commit

Permalink
Put start-fl-server.py into assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanyu-Jin committed Aug 22, 2022
1 parent e10cbc8 commit bb52f50
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ppml/trusted-big-data-ml/python/docker-graphene/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ RUN wget https://raw.githubusercontent.com/intel-analytics/analytics-zoo/bigdl-2
chmod a+x ./download-bigdl.sh
RUN ./download-bigdl.sh && \
rm bigdl*.zip
ADD ${BIGDL_HOME}/fl /ppml/trusted-big-data-ml/fl

# stage.4 ppml
FROM ubuntu:20.04
Expand Down Expand Up @@ -277,7 +278,6 @@ ADD ./test-suites /ppml/trusted-big-data-ml/work/test-suites
ADD ./_dill.py.patch ./_dill.py.patch
ADD ./python-uuid.patch ./python-uuid.patch
ADD ./python-pslinux.patch ./python-pslinux.patch
ADD ../../../../python/ppml/scripts/start-fl-server.py /ppml/trusted-big-data-ml/work/examples

RUN zip -u ${BIGDL_HOME}/jars/bigdl-dllib-spark_${SPARK_VERSION}-${BIGDL_VERSION}.jar ./tracker.py && \
patch /usr/local/lib/python3.7/dist-packages/dill/_dill.py ./_dill.py.patch && \
Expand Down Expand Up @@ -324,3 +324,4 @@ ADD azure /ppml/trusted-big-data-ml/azure
WORKDIR /ppml/trusted-big-data-ml

ENTRYPOINT [ "/opt/entrypoint.sh" ]

Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
#!/bin/bash

port=8980
client_num=2

while getopts "p:c:" opt
do
case $opt in
p)
port=$OPTARG
;;
c)
client_num=$OPTARG
;;
esac
done
cd /ppml/trusted-big-data-ml
/graphene/Tools/argv_serializer bash -c " /opt/jdk8/bin/java\
-cp '/ppml/trusted-big-data-ml/work/spark-3.1.2/conf/:/ppml/trusted-big-data-ml/work/spark-3.1.2/jars/*'\
-Xmx10g org.apache.spark.deploy.SparkSubmit\
--master 'local[4]'\
/ppml/trusted-big-data-ml/work/examples/start-fl-server.py -p 8981 --client-num=3" > /ppml/trusted-big-data-ml/secured-argvs
/ppml/trusted-big-data-ml/work/fl/start-fl-server.py -p $port -c $client_num" > /ppml/trusted-big-data-ml/secured-argvs
./init.sh
SGX=1 ./pal_loader bash 2>&1 | tee fl-server2.log
SGX=1 ./pal_loader bash 2>&1 | tee fl-server-sgx.log

5 changes: 5 additions & 0 deletions scala/assembly/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@
<include>bigdl-ppml*-jar-with-dependencies.jar</include>
</includes>
</fileSet>
<fileSet>
<outputDirectory>/fl</outputDirectory>
<directory>${project.parent.basedir}/../../../../../python/ppml/scripts</directory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
Expand Down Expand Up @@ -176,3 +180,4 @@
</dependencySet>
</dependencySets>
</assembly>

0 comments on commit bb52f50

Please sign in to comment.