docker: nvidia build

This commit is contained in:
Koushik Dutta
2024-05-02 22:25:02 -07:00
parent a0e5dd4c89
commit 31fd833873

View File

@@ -93,3 +93,33 @@ jobs:
${{ github.event.inputs.tag == 'latest' && matrix.BASE == '20-jammy-lite' && matrix.SUPERVISOR == '.s6' && 'ghcr.io/koush/scrypted:lite-s6' || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-nvidia:
needs: build
runs-on: ubuntu-latest
steps:
- name: NPM Package Request
id: npm-request
uses: fjogeleit/http-request-action@v1
with:
url: 'https://registry.npmjs.org/@scrypted/server'
method: 'GET'
- name: Set NPM Version
id: package-version
run: echo "NPM_VERSION=${{ fromJson(steps.npm-request.outputs.response)['dist-tags'][ github.event.inputs.tag] }}" >> "$GITHUB_OUTPUT"
- name: Build and push NVIDIA Docker image
uses: docker/build-push-action@v4
with:
build-args: |
BASE=ghcr.io/koush/scrypted:20-jammy-full.s6-v${{ steps.package-version.outputs.NPM_VERSION }}
context: install/docker/
file: install/docker/Dockerfile.nvidia
platforms: linux/amd64,linux/arm64
push: true
tags: |
koush/scrypted:nvidia-v${{ steps.package-version.outputs.NPM_VERSION }}
ghcr.io/koush/scrypted:nvidia-v${{ steps.package-version.outputs.NPM_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max