Add python toolkit image to manually_build.yml. (#6581)

This commit is contained in:
Jin Hanyu 2022-11-14 10:42:45 +08:00 committed by GitHub
parent 1453e5c244
commit 93351ffd0a

View file

@ -22,6 +22,8 @@ on:
- bigdl-ppml-trusted-realtime-ml-scala-occlum
- bigdl-ppml-kmsutil
- bigdl-ppml-pccs
- bigdl-ppml-trusted-python-toolkit-base
- bigdl-ppml-trusted-python-toolkit-ref
tag:
description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)'
required: true
@ -640,4 +642,63 @@ jobs:
docker push 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
- 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/custom-image
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 SGX_LOG_LEVEL=error \
--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}