ersilia-os / eos6ao8

Explainable AI for plasma protein binding prediction
GNU General Public License v3.0
1 stars 0 forks source link

Changes in Dockerfile workflow for ARM64 and AMD64 #5

Closed ZakiaYahya closed 1 year ago

ZakiaYahya commented 1 year ago
  1. Hello @GemmaTuron, We (me, @samuelmaina and @emmakodes) have come up with this solution. These are the changes we done in Dockerfile in workflows. Let us know if this solution is working or not.

Changes are done in this piece of original code

 `- name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          push: ${{ github.event_name != 'pull_request' }}
          tags: ersiliaos/${{ github.event.repository.name }}:latest

      - name: Docker Hub Description
        uses: peter-evans/dockerhub-description@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
          repository: ersiliaos/${{ github.event.repository.name }}
          short-description: "Ersilia Model Hub Identifier: ${{ github.event.repository.name }}"
`

to

`- name: Build and push (amd64)
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64
          push: ${{ github.event_name != 'pull_request' }}
          tags: ersiliaos/${{ github.event.repository.name }}:latest
      - name: Build and push (arm64)
        if: always()
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/arm64
          push: ${{ github.event_name != 'pull_request' }}
          tags: ersiliaos/${{ github.event.repository.name }}:latest
      - name: Build and push (amd64)
        if: failure()
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64
          push: ${{ github.event_name != 'pull_request' }}
          tags: ersiliaos/${{ github.event.repository.name }}:latest

      - name: Docker Hub Description
        uses: peter-evans/dockerhub-description@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
          repository: ersiliaos/${{ github.event.repository.name }}
          short-description: "Ersilia Model Hub Identifier: ${{ github.event.repository.name }}"`