-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove cuda dev files from nvidia variants (#251)
* nvidia nvenc/nvdec added * remove nvidia dockerfile * added nvidia variant template files * Updated Dockerfiles with nvidia variant * fix typo in condition - enable nvenc support for older versions * update dockerfiles again * update README * don't copy cuda dev files in nvidia variants * after update Co-authored-by: Lior Amrosi <[email protected]> Co-authored-by: shaul_myplay <7o46akCFfwLZ>
- Loading branch information
Showing
15 changed files
with
1,376 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# ffmpeg - http://ffmpeg.org/download.html | ||
# | ||
# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | ||
# | ||
# https://hub.docker.com/r/jrottenberg/ffmpeg/ | ||
# | ||
# | ||
|
||
FROM nvidia/cudagl:9.2-devel-ubuntu18.04 AS devel-base | ||
|
||
ENV NVIDIA_DRIVER_CAPABILITIES compat32,compute,video | ||
WORKDIR /tmp/workdir | ||
|
||
RUN apt-get -yqq update && \ | ||
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean -y | ||
|
||
FROM nvidia/cudagl:9.2-runtime-ubuntu18.04 AS runtime-base | ||
|
||
ENV NVIDIA_DRIVER_CAPABILITIES compat32,compute,video | ||
WORKDIR /tmp/workdir | ||
|
||
RUN apt-get -yqq update && \ | ||
apt-get install -yq --no-install-recommends ca-certificates expat libgomp1 libxcb-shape0-dev && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean -y | ||
|
||
|
||
FROM devel-base as build | ||
|
||
ENV NVIDIA_HEADERS_VERSION=8.1.24.9 | ||
ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig | ||
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/ffmpeg/lib" | ||
ARG PREFIX=/opt/ffmpeg | ||
ARG MAKEFLAGS="-j12" | ||
|
||
ENV %%ENV%% | ||
|
||
RUN buildDeps="autoconf \ | ||
automake \ | ||
cmake \ | ||
curl \ | ||
bzip2 \ | ||
libexpat1-dev \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
gperf \ | ||
libtool \ | ||
make \ | ||
nasm \ | ||
perl \ | ||
pkg-config \ | ||
python \ | ||
libssl-dev \ | ||
yasm \ | ||
zlib1g-dev" && \ | ||
apt-get -yqq update && \ | ||
apt-get install -yq --no-install-recommends ${buildDeps} | ||
|
||
RUN \ | ||
DIR=/tmp/nv-codec-headers && \ | ||
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git ${DIR} && \ | ||
cd ${DIR} && \ | ||
git checkout n${NVIDIA_HEADERS_VERSION} && \ | ||
sed -i 's@/usr/local@'"$PREFIX"'@' Makefile && \ | ||
make && \ | ||
make install && \ | ||
rm -rf ${DIR} | ||
|
||
%%RUN%% | ||
## cleanup | ||
RUN \ | ||
ldd ${PREFIX}/bin/ffmpeg | grep opt/ffmpeg | cut -d ' ' -f 3 | xargs -i cp {} /usr/local/lib/ && \ | ||
cp ${PREFIX}/bin/* /usr/local/bin/ && \ | ||
cp -r ${PREFIX}/share/ffmpeg /usr/local/share/ && \ | ||
LD_LIBRARY_PATH=/usr/local/lib ffmpeg -buildconf | ||
|
||
|
||
|
||
FROM runtime-base AS release | ||
MAINTAINER Julien Rottenberg <[email protected]> | ||
|
||
CMD ["--help"] | ||
ENTRYPOINT ["ffmpeg"] | ||
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" | ||
|
||
# copy only needed files, without copying nvidia dev files | ||
COPY --from=build /usr/local/bin /usr/local/bin/ | ||
COPY --from=build /usr/local/share /usr/local/share/ | ||
COPY --from=build /usr/local/lib /usr/local/lib/ | ||
COPY --from=build /usr/local/include /usr/local/include/ | ||
|
||
# Let's make sure the app built correctly | ||
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output | ||
|
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
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