Closed KaHooli closed 3 years ago
@KaHooli can you confirm it's all good with the latest images ?
I got a 'works on my box' for ya! Can't speak for any other config.
NOTE: When I was testing myself before your checkin last week, I had to add the following line to the dockerfile to get it to build or it would hang waiting for input when updating/installing tzdata:
ENV DEBIAN_FRONTEND=nonintercative
2nd note: FFmpeg output from the 2004 docker says built on 1804, which would explain the noninteractive bit not checked in on your side.
CentOS7 w/ a P2000
[creynolds@masterblaster ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[creynolds@masterblaster ~]$ rpm -qa | grep nvidia
libnvidia-container-tools-1.4.0-1.x86_64
nvidia-driver-cuda-460.84-1.el7.x86_64
nvidia-container-toolkit-1.5.1-2.x86_64
nvidia-container-runtime-3.5.0-1.x86_64
nvidia-driver-libs-460.84-1.el7.x86_64
nvidia-driver-NVML-460.84-1.el7.x86_64
nvidia-driver-cuda-libs-460.84-1.el7.x86_64
nvidia-driver-libs-460.84-1.el7.i686
libnvidia-container1-1.4.0-1.x86_64
nvidia-docker2-2.6.0-1.noarch
kmod-nvidia-460.84-1.el7.x86_64
nvidia-persistenced-460.84-1.el7.x86_64
nvidia-kmod-common-460.84-1.el7.noarch
nvidia-driver-460.84-1.el7.x86_64
[creynolds@masterblaster ~]$ rpm -qa | grep docker
docker-ce-20.10.7-3.el7.x86_64
docker-ce-cli-20.10.7-3.el7.x86_64
docker-scan-plugin-0.8.0-3.el7.x86_64
nvidia-docker2-2.6.0-1.noarch
docker-ce-rootless-extras-20.10.7-3.el7.x86_64
[creynolds@masterblaster ~]$ INPUT="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
[creynolds@masterblaster ~]$ OUTPUT="output.mkv"
[creynolds@masterblaster ~]$ docker run --gpus all -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:4.4-nvidia2004 -hwaccel cuvid -c:v h264_cuvid -i ${INPUT} -vf scale_npp=1280:-1 -c:v h264_nvenc -b:v 2048k -y ${OUTPUT}
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
WARNING: defaulting hwaccel_output_format to cuda for compatibility with old commandlines. This behaviour is DEPRECATED and will be removed in the future. Please explicitly set "-hwaccel_output_format cuda".
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2010-01-10T08:29:06.000000Z
Duration: 00:09:56.47, start: 0.000000, bitrate: 2119 kb/s
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2010-01-10T08:29:06.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
vendor_id : [0][0][0][0]
Stream #0:1(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
Metadata:
creation_time : 2010-01-10T08:29:06.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:1 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
Stream #0:0 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, matroska, to 'output.mkv':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
encoder : Lavf58.76.100
Stream #0:0(und): Video: h264 (H264 / 0x34363248), cuda(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2048 kb/s, 24 fps, 1k tbn (default)
Metadata:
creation_time : 2010-01-10T08:29:06.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
vendor_id : [0][0][0][0]
encoder : Lavc58.134.100 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 0/0/2048000 buffer size: 4096000 vbv_delay: N/A
Stream #0:1(und): Audio: vorbis (oV[0][0] / 0x566F), 44100 Hz, stereo, fltp (default)
Metadata:
creation_time : 2010-01-10T08:29:06.000000Z
handler_name : (C) 2007 Google Inc. v08.13.2007.
vendor_id : [0][0][0][0]
encoder : Lavc58.134.100 libvorbis
frame=14315 fps=630 q=20.0 Lsize= 155690kB time=00:09:56.45 bitrate=2138.3kbits/s speed=26.2x
video:148336kB audio:7051kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.194863%
[creynolds@masterblaster ~]$ ls -lah
total 153M
drwxrwxr-x 2 creynolds creynolds 68 Jun 23 08:38 .
drwxrwxr-x 13 creynolds creynolds 192 Jun 16 20:34 ..
-rw-r--r-- 1 root root 153M Jun 23 08:38 output.mkv
[creynolds@masterblaster ~]$ nvidia-smi
Wed Jun 23 08:38:26 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.84 Driver Version: 460.84 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro P2000 Off | 00000000:01:00.0 Off | N/A |
| 47% 38C P0 28W / 75W | 139MiB / 5059MiB | 6% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 12834 C ffmpeg 135MiB |
+-----------------------------------------------------------------------------+
Also, when I was testing myself, I thought I would have to add the configure options from this pull to support more cards, but it seems fine how it is. https://github.com/pecord/FFmpeg/pull/1
Last comment was helpful here for that, compiled ok but again; does not seem to matter right now. https://github.com/NVIDIA/cuda-samples/issues/46
you can just add --nvccflags="-gencode arch=compute_75,code=sm_75 -O2"
Hi, all the NVIDIA images aren't working as they need either Libc6 2.28 or 2.29, but as the base images are Ubuntu 18.04, the highest Libc6 that can be installed is 2.27, as can be seen here.
Can the base image please be upgraded to Ubuntu 20.04?