Build python toolkit image in manually build for test. (#6542)

* Build python toolkit image in manually build for test.

* Correct the name of image in options and job.
This commit is contained in:
Jin Hanyu 2022-11-10 17:04:30 +08:00 committed by GitHub
parent bd073e940a
commit 25d01a16b5

View file

@ -26,6 +26,8 @@ on:
- bigdl-ppml-trusted-realtime-ml-scala-occlum - bigdl-ppml-trusted-realtime-ml-scala-occlum
- bigdl-ppml-kmsutil - bigdl-ppml-kmsutil
- bigdl-ppml-pccs - bigdl-ppml-pccs
- bigdl-ppml-trusted-python-toolkit-base
- bigdl-ppml-trusted-python-toolkit-ref
tag: tag:
description: 'docker image tag (e.g. test)' description: 'docker image tag (e.g. test)'
required: true required: true
@ -572,3 +574,65 @@ jobs:
docker tag ${IMAGE}:${TAG} 10.239.45.10/arda/${IMAGE}:${TAG} docker tag ${IMAGE}:${TAG} 10.239.45.10/arda/${IMAGE}:${TAG}
docker push 10.239.45.10/arda/${IMAGE}:${TAG} docker push 10.239.45.10/arda/${IMAGE}:${TAG}
docker rmi -f ${IMAGE}:${TAG} 10.239.45.10/arda/${IMAGE}:${TAG} docker rmi -f ${IMAGE}:${TAG} 10.239.45.10/arda/${IMAGE}:${TAG}
bigdl-ppml-trusted-python-toolkit-base:
if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-python-toolkit-base' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted, Shire]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.sha }}
- name: docker login
run: |
docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD}
- name: bigdl-ppml-trusted-python-toolkit-base
run: |
echo "##############################################################"
echo "########## bigdl-ppml-trusted-python-toolkit-base ############"
echo "##############################################################"
export base_image=intelanalytics/bigdl-ppml-gramine-base
export image=intelanalytics/bigdl-ppml-trusted-python-toolkit-base
cd ppml/trusted-python-toolkit
sudo docker build \
--no-cache=true \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg BASE_IMAGE_NAME=${base_image} \
--build-arg BASE_IMAGE_TAG=${TAG} \
-t ${image}:${TAG} -f ./Dockerfile .
sudo docker push ${image}:${TAG}
sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG}
sudo docker push 10.239.45.10/arda/${image}:${TAG}
sudo docker rmi -f ${image}:${TAG}
bigdl-ppml-trusted-python-toolkit-ref:
if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-python-toolkit-ref' || github.event.inputs.artifact == 'all' }}
runs-on: [self-hosted, Shire]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.sha }}
- name: docker login
run: |
docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_PASSWORD}
- name: bigdl-ppml-trusted-python-toolkit-ref
run: |
echo "##############################################################"
echo "########## bigdl-ppml-trusted-python-toolkit-ref #############"
echo "##############################################################"
export base_image=intelanalytics/bigdl-ppml-trusted-python-toolkit-base
export image=intelanalytics/bigdl-ppml-trusted-python-toolkit-ref
cd ppml/trusted-python-toolkit
openssl genrsa -3 -out enclave-key.pem 3072
sudo docker build \
--no-cache=true \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg BASE_IMAGE_NAME=${base_image} \
--build-arg SGX_MEM_SIZE=64G \
--build-arg BASE_IMAGE_TAG=${TAG} \
-t ${image}:${TAG} -f ./Dockerfile .
sudo docker push ${image}:${TAG}
sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG}
sudo docker push 10.239.45.10/arda/${image}:${TAG}
sudo docker rmi -f ${image}:${TAG}