Skip to content

Commit

Permalink
chore: jdk17_ffmpeg_nvidia
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed Apr 29, 2024
1 parent 439d367 commit d1b5fc1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_jdk17_ffmpeg_nvidia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Push Multi-Platform Docker Image

on:
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

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

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: docker/nvidia
file: docker/nvidia/Dockerfile
push: true
tags: jmal/jdk17_ffmpeg_nvidia:latest
platforms: linux/amd64,linux/arm64
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
13 changes: 13 additions & 0 deletions docker/nvidia/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM eclipse-temurin:17-jre

# 安装 FFmpeg
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:jonathonf/ffmpeg-5 && \
apt-get update && \
apt-get install -y ffmpeg libavcodec-extra

# 环境变量
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV NVIDIA_VISIBLE_DEVICES=all

0 comments on commit d1b5fc1

Please sign in to comment.