Skip to content

Commit

Permalink
Merge branch 'main' of github.com:koush/scrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed May 3, 2024
2 parents dd13fee + 8dac20e commit 1594364
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: NPM Package Request
id: npm-request
uses: fjogeleit/http-request-action@v1
Expand All @@ -109,17 +112,30 @@ jobs:
id: package-version
run: echo "NPM_VERSION=${{ fromJson(steps.npm-request.outputs.response)['dist-tags'][ github.event.inputs.tag] }}" >> "$GITHUB_OUTPUT"

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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 }}
${{ github.event.inputs.tag == 'latest' && 'koush/scrypted:nvidia' || '' }}
ghcr.io/koush/scrypted:nvidia-v${{ steps.package-version.outputs.NPM_VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
${{ github.event.inputs.tag == 'latest' && 'ghcr.io/koush/scrypted:nvidia' || '' }}
22 changes: 7 additions & 15 deletions install/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,19 @@ services:
# See volumes section below to use the host daemon.
# - SCRYPTED_DOCKER_AVAHI=true

# NVIDIA (Part 1 of 3)
# NVIDIA (Part 1 of 4)
# - NVIDIA_VISIBLE_DEVICES=all
# - NVIDIA_DRIVER_CAPABILITIES=all

# NVIDIA (Part 2 of 3) - Ensure CUDA versions below match the host system
# NVIDIA (Part 2 of 4)
# runtime: nvidia
# pull_policy: build
# build:
# context: .
# dockerfile_inline: |
# FROM ghcr.io/koush/scrypted
# RUN apt update -q \
# && apt install wget \
# && wget -qO /cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
# && dpkg -i /cuda-keyring.deb \
# && apt update -q \
# && apt install -y cuda-nvcc-12-4 libcublas-12-4 libcudnn8 cuda-libraries-12-4

# NVIDIA (Part 3 of 4) - Use NVIDIA image, and remove subsequent default image.
# image: ghcr.io/koush/scrypted:nvidia
image: ghcr.io/koush/scrypted

volumes:
# NVIDIA (Part 3 of 3)
# NVIDIA (Part 4 of 4)
# - /etc/OpenCL/vendors/nvidia.icd:/etc/OpenCL/vendors/nvidia.icd

# Scrypted NVR Storage (Part 3 of 3)
Expand Down Expand Up @@ -106,7 +99,6 @@ services:
container_name: scrypted
restart: unless-stopped
network_mode: host
image: ghcr.io/koush/scrypted

# logging is noisy and will unnecessarily wear on flash storage.
# scrypted has per device in memory logging that is preferred.
Expand Down

0 comments on commit 1594364

Please sign in to comment.