Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb1d233

Browse filesBrowse files
author
Markus Perl
committed
Cuda fixes
1 parent 9aee19c commit eb1d233
Copy full SHA for eb1d233

File tree

Expand file treeCollapse file tree

6 files changed

+16
-84
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+16
-84
lines changed

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
-24Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,30 +103,6 @@ jobs:
103103
run: |
104104
docker run --rm ffmpeg:cuda-ubuntu -buildconf
105105
106-
build-cuda-rocky-docker:
107-
name: build in Rockylinux docker with cuda
108-
runs-on: ubuntu-latest
109-
steps:
110-
- name: Checkout code
111-
uses: actions/checkout@v2
112-
113-
- name: pull base image
114-
id: cuda_centos_pull
115-
run: |
116-
docker pull nvidia/cuda:11.6.0-devel-centos8
117-
docker pull rockylinux:8
118-
- name: run if cuda_centos_pull failed
119-
if: failure() && steps.cuda_centos_pull.outcome == 'failure'
120-
run: |
121-
docker pull nvidia/cuda:11.6.0-devel-centos8
122-
docker pull rockylinux:8
123-
- name: build ffmpeg
124-
run: |
125-
docker build -t ffmpeg:cuda-rocky -f cuda-rocky.dockerfile .
126-
- name: test run ffmepg
127-
run: |
128-
docker run --rm ffmpeg:cuda-rocky -buildconf
129-
130106
build-full-static:
131107
name: full static build in docker
132108
runs-on: ubuntu-22.04

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ workspace
33
.idea
44
linux
55
.artifacts
6+
build

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,9 @@ $ docker build --tag=ffmpeg:default --output type=local,dest=build -f Dockerfile
150150
##### CUDA
151151
These builds are always built with the --enable-gpl-and-non-free switch, as CUDA is non-free. See https://ffmpeg.org/legal.html
152152
```bash
153-
export DOCKER_BUILDKIT=1
154-
155-
## Set the DIST (`ubuntu` or `rocky`) and VER (ubuntu: `16.04` , `18.04`, `20.04` or rocky: `8`) environment variables to select the preferred Docker base image.
156-
$ export DIST=centos
157-
$ export VER=8
158153

159154
## Start the build
160-
$ docker build --tag=ffmpeg:cuda-$DIST -f cuda-$DIST.dockerfile --build-arg VER=$VER .
155+
$ docker build --tag=ffmpeg:cuda-$DIST -f cuda-ubunu.dockerfile --build-arg .
161156
```
162157

163158
Build an `export.dockerfile` that copies only what you need from the image you just built as follows. When running,

‎build-ffmpeg

Copy file name to clipboardExpand all lines: build-ffmpeg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
878878
fi
879879
CFLAGS+=" -I/usr/local/cuda/include"
880880
LDFLAGS+=" -L/usr/local/cuda/lib64"
881-
CONFIGURE_OPTIONS+=("--enable-cuda-nvcc" "--enable-nvenc" "--enable-cuda-llvm")
881+
CONFIGURE_OPTIONS+=("--enable-cuda-nvcc" "--enable-cuvid" "--enable-nvenc" "--enable-cuda-llvm")
882882

883883
if [ -z "$LDEXEFLAGS" ]; then
884884
CONFIGURE_OPTIONS+=("--enable-libnpp") # Only libnpp cannot be statically linked.

‎cuda-rocky.dockerfile

Copy file name to clipboardExpand all lines: cuda-rocky.dockerfile
-49Lines changed: 0 additions & 49 deletions
This file was deleted.

‎cuda-ubuntu.dockerfile

Copy file name to clipboardExpand all lines: cuda-ubuntu.dockerfile
+13-4Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
ARG VER=22.04
22

3-
FROM nvidia/cuda:11.8.0-devel-ubuntu${VER} AS build
3+
FROM ubuntu:${VER} AS build
4+
5+
ARG CUDAVER=11.8.0-1
46

57
ENV DEBIAN_FRONTEND noninteractive
68
ENV NVIDIA_VISIBLE_DEVICES all
79
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
810

911
RUN apt-get update \
10-
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev python3 python-is-python3 ninja-build meson \
11-
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
12-
&& update-ca-certificates
12+
&& apt-get -y --no-install-recommends install wget ca-certificates \
13+
&& update-ca-certificates \
14+
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
15+
&& dpkg -i cuda-keyring_1.0-1_all.deb \
16+
&& apt-get update
17+
18+
RUN apt-get -y --no-install-recommends install build-essential curl libva-dev python3 python-is-python3 ninja-build meson \
19+
cuda="${CUDAVER}" \
20+
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
21+
1322

1423
WORKDIR /app
1524
COPY ./build-ffmpeg /app/build-ffmpeg

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.