Docker Build #78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Build | |
| run-name: Docker Build | |
| on: | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-image: | |
| runs-on: ppf-contact-solver-NVIDIA | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Docker Login | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Compiled Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| push: false | |
| load: true | |
| tags: ${{ env.REGISTRY }}/${{ github.repository }}-compiled-sigasia-2024:latest | |
| - name: Run headless.py on built image | |
| run: | | |
| docker run --rm --gpus all \ | |
| ${{ env.REGISTRY }}/${{ github.repository }}-compiled-sigasia-2024:latest \ | |
| /bin/sh -c "cd /root/ppf-contact-solver && PYTHONPATH=/root/ppf-contact-solver /root/.local/share/ppf-cts/venv/bin/python examples/headless.py" | |
| - name: Run fast_check on built image | |
| run: | | |
| docker run --rm --gpus all \ | |
| ${{ env.REGISTRY }}/${{ github.repository }}-compiled-sigasia-2024:latest \ | |
| /bin/sh -c "cd /root/ppf-contact-solver && python3 warmup.py fast_check && python3 warmup.py clear_all" | |
| - name: Push Compiled Image | |
| run: docker push ${{ env.REGISTRY }}/${{ github.repository }}-compiled-sigasia-2024:latest |