fix: nvidia mem utilization #49
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
| # This workflow packs the Docker images for the GPUStack runtime. | |
| name: pack | |
| permissions: | |
| actions: read | |
| contents: write | |
| pull-requests: write | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - "main" | |
| - "v*-dev" | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "v*-dev" | |
| env: | |
| INPUT_PYTHON_VERSION: 3.11 | |
| INPUT_USERNAME: gpustack | |
| INPUT_PASSWORD: ${{ secrets.CI_DOCKERHUB_PASSWORD }} | |
| INPUT_NAMESPACE: gpustack | |
| INPUT_REPOSITORY: runtime | |
| jobs: | |
| pack: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 360 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| persist-credentials: false | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.8.24" | |
| enable-cache: true | |
| python-version: ${{ env.INPUT_PYTHON_VERSION }} | |
| - name: Build | |
| run: | | |
| make build | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| image: tonistiigi/binfmt:qemu-v9.2.2 | |
| platforms: "arm64" | |
| - name: Setup BuildX | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: | | |
| network=host | |
| env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 | |
| env.BUILDKIT_STEP_LOG_MAX_SPEED=-1 | |
| - name: Login DockerHub | |
| if: ${{ github.event_name != 'pull_request' }} | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ env.INPUT_USERNAME }} | |
| password: ${{ env.INPUT_PASSWORD }} | |
| - name: Get Metadata | |
| id: metadata | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: "${{ env.INPUT_NAMESPACE }}/${{ env.INPUT_REPOSITORY }}" | |
| - name: Package | |
| uses: docker/build-push-action@v6 | |
| with: | |
| allow: | | |
| network.host | |
| security.insecure | |
| ulimit: | | |
| nofile=65536:65536 | |
| provenance: true | |
| sbom: true | |
| push: ${{ github.event_name != 'pull_request' }} | |
| file: ${{ github.workspace }}/pack/Dockerfile | |
| context: ${{ github.workspace }} | |
| platforms: "linux/amd64,linux/arm64" | |
| build-args: | | |
| PYTHON_VERSION=${{ env.INPUT_PYTHON_VERSION }} | |
| tags: | | |
| ${{ steps.metadata.outputs.tags }} | |
| labels: | | |
| ${{ steps.metadata.outputs.labels }} | |
| cache-from: | | |
| type=registry,ref=${{ env.INPUT_NAMESPACE }}/${{ env.INPUT_REPOSITORY }}:build-cache | |
| cache-to: | | |
| ${{ github.event_name != 'pull_request' && format('type=registry,mode=max,compression=gzip,ref={0}/{1}:build-cache,ignore-error=true', env.INPUT_NAMESPACE, env.INPUT_REPOSITORY) || '' }} |