feat: add ffmpeg images (#492)

Signed-off-by: mudler <mudler@mocaccino.org>
This commit is contained in:
Ettore Di Giacinto 2023-06-04 14:00:21 +02:00 committed by GitHub
parent 3892fafc2d
commit 1bb85377e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -22,18 +22,41 @@ jobs:
platforms: 'linux/amd64,linux/arm64' platforms: 'linux/amd64,linux/arm64'
tag-latest: 'auto' tag-latest: 'auto'
tag-suffix: '' tag-suffix: ''
ffmpeg: ''
- build-type: 'cublas' - build-type: 'cublas'
cuda-major-version: 11 cuda-major-version: 11
cuda-minor-version: 7 cuda-minor-version: 7
platforms: 'linux/amd64' platforms: 'linux/amd64'
tag-latest: 'false' tag-latest: 'false'
tag-suffix: '-cublas-cuda11' tag-suffix: '-cublas-cuda11'
ffmpeg: ''
- build-type: 'cublas' - build-type: 'cublas'
cuda-major-version: 12 cuda-major-version: 12
cuda-minor-version: 1 cuda-minor-version: 1
platforms: 'linux/amd64' platforms: 'linux/amd64'
tag-latest: 'false' tag-latest: 'false'
tag-suffix: '-cublas-cuda12' tag-suffix: '-cublas-cuda12'
ffmpeg: ''
- build-type: ''
platforms: 'linux/amd64,linux/arm64'
tag-latest: 'auto'
tag-suffix: ''
ffmpeg: 'true'
- build-type: 'cublas'
cuda-major-version: 11
cuda-minor-version: 7
platforms: 'linux/amd64'
tag-latest: 'false'
tag-suffix: '-cublas-cuda11-ffmpeg'
ffmpeg: 'true'
- build-type: 'cublas'
cuda-major-version: 12
cuda-minor-version: 1
platforms: 'linux/amd64'
tag-latest: 'false'
tag-suffix: '-cublas-cuda12-ffmpeg'
ffmpeg: 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -77,6 +100,7 @@ jobs:
BUILD_TYPE=${{ matrix.build-type }} BUILD_TYPE=${{ matrix.build-type }}
CUDA_MAJOR_VERSION=${{ matrix.cuda-major-version }} CUDA_MAJOR_VERSION=${{ matrix.cuda-major-version }}
CUDA_MINOR_VERSION=${{ matrix.cuda-minor-version }} CUDA_MINOR_VERSION=${{ matrix.cuda-minor-version }}
FFMPEG=${{ matrix.ffmpeg }}
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}

View File

@ -48,6 +48,7 @@ ARG BUILD_TYPE=
ARG GO_TAGS=stablediffusion ARG GO_TAGS=stablediffusion
ARG CUDA_MAJOR_VERSION=11 ARG CUDA_MAJOR_VERSION=11
ARG CUDA_MINOR_VERSION=7 ARG CUDA_MINOR_VERSION=7
ARG FFMPEG=
ENV BUILD_TYPE=${BUILD_TYPE} ENV BUILD_TYPE=${BUILD_TYPE}
ENV GO_TAGS=${GO_TAGS} ENV GO_TAGS=${GO_TAGS}
@ -73,6 +74,12 @@ RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \
apt-get update && \ apt-get update && \
apt-get install -y cuda-nvcc-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} \ apt-get install -y cuda-nvcc-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} \
; fi ; fi
# Add FFmpeg
RUN if [ "${FFMPEG}" = "true" ]; then \
apt-get install -y ffmpeg \
; fi
ENV PATH /usr/local/cuda/bin:${PATH} ENV PATH /usr/local/cuda/bin:${PATH}
# OpenBLAS requirements # OpenBLAS requirements