<commit_before>name: Manually Build

on:
  workflow_dispatch:
    inputs:
      artifact:
        description: 'select which job to run("all" will make all jobs run)'
        required: true
        default: 'all'
        type: choice
        options:
        - all
        - bigdl-ppml-gramine-base
        - bigdl-ppml-trusted-deep-learning-gramine-base
        - bigdl-ppml-trusted-deep-learning-gramine-ref
        - bigdl-ppml-trusted-big-data-ml-python-gramine
        - bigdl-ppml-trusted-big-data-ml-python-graphene
        - bigdl-ppml-trusted-big-data-ml-scala-occlum
        - bigdl-ppml-trusted-big-data-ml-scala-occlum-production
        - bigdl-ppml-trusted-realtime-ml-scala-graphene
        - bigdl-ppml-trusted-realtime-ml-scala-occlum
        - bigdl-ppml-kmsutil
        - bigdl-ppml-pccs
      tag:
        description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)'
        required: true
        default: 'latest'
        type: string

env:
  TAG: ${{ github.event.inputs.tag }}

permissions:
  contents: read
  packages: write

jobs:
  bigdl-ppml-gramine-base:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-gramine-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-gramine-base
      run: |
        echo "########################################"
        echo "####### bigdl-ppml-gramine-base ########"
        echo "########################################"
        export base_image=intelanalytics/bigdl-ppml-gramine-base
        cd ppml/base
        sudo docker build \
          --no-cache=true \
          --build-arg http_proxy=${HTTP_PROXY} \
          --build-arg https_proxy=${HTTPS_PROXY} \
          --build-arg JDK_VERSION=8u192 \
          --build-arg JDK_URL=${JDK_URL} \
          --build-arg no_proxy=${NO_PROXY} \
          -t ${base_image}:${TAG} -f ./Dockerfile .
        sudo docker push ${base_image}:${TAG}
        sudo docker tag ${base_image}:${TAG} 10.239.45.10/arda/${base_image}:${TAG}
        sudo docker push 10.239.45.10/arda/${base_image}:${TAG}
        sudo docker rmi -f ${base_image}:${TAG}

  bigdl-ppml-trusted-deep-learning-gramine-base:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-deep-learning-gramine-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-deep-learning-gramine-base
      run: |
        echo "##############################################################"
        echo "####### bigdl-ppml-trusted-deep-learning-gramine-base ########"
        echo "##############################################################"
        export base_image=intelanalytics/bigdl-ppml-gramine-base
        export image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-base
        cd ppml/trusted-deep-learning/base
        sudo docker build \
          --no-cache=true \
          --build-arg http_proxy=${HTTP_PROXY} \
          --build-arg https_proxy=${HTTPS_PROXY} \
          --build-arg no_proxy=${NO_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-deep-learning-gramine-ref:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-deep-learning-gramine-ref' || 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-deep-learning-gramine-ref
      run: |
        echo "##############################################################"
        echo "####### bigdl-ppml-trusted-deep-learning-gramine-ref #########"
        echo "##############################################################"
        export base_image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-base
        export image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-ref
        cd ppml/base/trusted-deep-learning/ref
        openssl genrsa -3 -out enclave-key.pem 3072
        sudo docker build \
          --no-cache=true \<commit_msg>Fix workflow path issue (#6209)<commit_after>name: Manually Build

on:
  workflow_dispatch:
    inputs:
      artifact:
        description: 'select which job to run("all" will make all jobs run)'
        required: true
        default: 'all'
        type: choice
        options:
        - all
        - bigdl-ppml-gramine-base
        - bigdl-ppml-trusted-deep-learning-gramine-base
        - bigdl-ppml-trusted-deep-learning-gramine-ref
        - bigdl-ppml-trusted-big-data-ml-python-gramine
        - bigdl-ppml-trusted-big-data-ml-python-graphene
        - bigdl-ppml-trusted-big-data-ml-scala-occlum
        - bigdl-ppml-trusted-big-data-ml-scala-occlum-production
        - bigdl-ppml-trusted-realtime-ml-scala-graphene
        - bigdl-ppml-trusted-realtime-ml-scala-occlum
        - bigdl-ppml-kmsutil
        - bigdl-ppml-pccs
      tag:
        description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)'
        required: true
        default: 'latest'
        type: string

env:
  TAG: ${{ github.event.inputs.tag }}

permissions:
  contents: read
  packages: write

jobs:
  bigdl-ppml-gramine-base:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-gramine-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-gramine-base
      run: |
        echo "########################################"
        echo "####### bigdl-ppml-gramine-base ########"
        echo "########################################"
        export base_image=intelanalytics/bigdl-ppml-gramine-base
        cd ppml/base
        sudo docker build \
          --no-cache=true \
          --build-arg http_proxy=${HTTP_PROXY} \
          --build-arg https_proxy=${HTTPS_PROXY} \
          --build-arg JDK_VERSION=8u192 \
          --build-arg JDK_URL=${JDK_URL} \
          --build-arg no_proxy=${NO_PROXY} \
          -t ${base_image}:${TAG} -f ./Dockerfile .
        sudo docker push ${base_image}:${TAG}
        sudo docker tag ${base_image}:${TAG} 10.239.45.10/arda/${base_image}:${TAG}
        sudo docker push 10.239.45.10/arda/${base_image}:${TAG}
        sudo docker rmi -f ${base_image}:${TAG}

  bigdl-ppml-trusted-deep-learning-gramine-base:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-deep-learning-gramine-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-deep-learning-gramine-base
      run: |
        echo "##############################################################"
        echo "####### bigdl-ppml-trusted-deep-learning-gramine-base ########"
        echo "##############################################################"
        export base_image=intelanalytics/bigdl-ppml-gramine-base
        export image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-base
        cd ppml/trusted-deep-learning/base
        sudo docker build \
          --no-cache=true \
          --build-arg http_proxy=${HTTP_PROXY} \
          --build-arg https_proxy=${HTTPS_PROXY} \
          --build-arg no_proxy=${NO_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-deep-learning-gramine-ref:
    if: ${{ github.event.inputs.artifact == 'bigdl-ppml-trusted-deep-learning-gramine-ref' || 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-deep-learning-gramine-ref
      run: |
        echo "##############################################################"
        echo "####### bigdl-ppml-trusted-deep-learning-gramine-ref #########"
        echo "##############################################################"
        export base_image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-base
        export image=intelanalytics/bigdl-ppml-trusted-deep-learning-gramine-ref
        cd ppml/trusted-deep-learning/ref
        openssl genrsa -3 -out enclave-key.pem 3072
        sudo docker build \
          --no-cache=true \
{'fraction_non_alphanumeric': 0.20919613465010087, 'fraction_numerical': 0.01125623871721355, 'mean_word_length': 2.4855662472242783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4805831', 'n_tokens_mistral': 3302, 'n_tokens_neox': 3103, 'n_words': 492}