Last active
January 20, 2020 14:52
-
-
Save camdenfullmer/c0e6a83d5f14330ae7bbf3f465967d65 to your computer and use it in GitHub Desktop.
Run NVIDIA Video Codec SDK samples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -f lavfi -i testsrc=size=1280x720:rate=30:duration=2 -profile:v high -c:v libx264 -pix_fmt yuv420p test.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:10.2-devel-ubuntu18.04 | |
RUN apt-get update && apt-get install -qy freeglut3-dev libegl1-mesa-dev libglew-dev pkg-config unzip wget yasm | |
# Get the Video Codec SDK Samples (an updated set of samples can be found using NVIDIA's site at https://developer.nvidia.com/nvidia-video-codec-sdk/download) | |
RUN cd /tmp && \ | |
wget https://github.com/NVIDIA/video-sdk-samples/archive/master.zip && \ | |
unzip master.zip && \ | |
rm master.zip && \ | |
mv video-sdk-samples-master /usr/src/app | |
# Install ffmpeg. | |
RUN cd /usr/src/app/Samples/External/FFmpeg/src && \ | |
unzip ffmpeg-3.4.1.zip && \ | |
chmod -R 755 ffmpeg-3.4.1 && \ | |
cd ffmpeg-3.4.1 && \ | |
./configure && \ | |
make -j`nproc` && \ | |
make install | |
# Install Vulkan (this is really just to get the samples to compile). | |
RUN cd /tmp && \ | |
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - && \ | |
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.130-bionic.list http://packages.lunarg.com/vulkan/1.1.130/lunarg-vulkan-1.1.130-bionic.list && \ | |
apt-get update && \ | |
apt-get install -qy vulkan-sdk | |
WORKDIR /usr/src/app/Samples | |
RUN make -j`nproc` | |
ENV NVIDIA_VISIBLE_DEVICES all | |
ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility | |
ENTRYPOINT [ "/usr/src/app/Samples/AppDecode/AppDec/AppDec" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
docker build -t nvidia-samples . | |
docker run --gpus all --rm -it -v $PWD:/tmp nvidia-samples:latest -i /tmp/test.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment