refactor: streamline CUDA development tools installation and simplify FFmpeg configuration for NVIDIA support
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Successful in 10m9s
Build Worker Base and Application Images / build-docker (push) Successful in 4m4s
Build Worker Base and Application Images / deploy-stack (push) Successful in 43s
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Successful in 10m9s
Build Worker Base and Application Images / build-docker (push) Successful in 4m4s
Build Worker Base and Application Images / deploy-stack (push) Successful in 43s
This commit is contained in:
parent
fa3ab5c6d2
commit
bdbf688946
1 changed files with 16 additions and 12 deletions
|
@ -18,6 +18,11 @@ RUN apt-get update && apt-get install -y \
|
|||
libc6-dev \
|
||||
libnuma1 \
|
||||
libnuma-dev \
|
||||
# Essential compilation libraries
|
||||
gcc \
|
||||
g++ \
|
||||
libc6-dev \
|
||||
linux-libc-dev \
|
||||
# System libraries
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
|
@ -37,13 +42,18 @@ RUN apt-get update && apt-get install -y \
|
|||
python3-numpy \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install minimal CUDA development tools (just what we need for FFmpeg)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Add NVIDIA CUDA repository and install minimal development tools
|
||||
RUN apt-get update && apt-get install -y wget gnupg && \
|
||||
wget -O - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub | apt-key add - && \
|
||||
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
cuda-nvcc-12-6 \
|
||||
cuda-cudart-dev-12-6 \
|
||||
libnvidia-encode-12-6 \
|
||||
libnvidia-decode-12-6 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
libnpp-dev-12-6 \
|
||||
&& apt-get remove -y wget gnupg && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Ensure CUDA paths are available
|
||||
ENV PATH="/usr/local/cuda/bin:${PATH}"
|
||||
|
@ -62,7 +72,7 @@ RUN cd /tmp && \
|
|||
# Download FFmpeg source (official method)
|
||||
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/ && \
|
||||
cd ffmpeg && \
|
||||
# Configure with NVIDIA support (following official NVIDIA documentation)
|
||||
# Configure with NVIDIA support (simplified to avoid configure issues)
|
||||
./configure \
|
||||
--prefix=/usr/local \
|
||||
--enable-shared \
|
||||
|
@ -70,18 +80,12 @@ RUN cd /tmp && \
|
|||
--enable-nonfree \
|
||||
--enable-gpl \
|
||||
--enable-cuda-nvcc \
|
||||
--enable-cuda-llvm \
|
||||
--enable-cuvid \
|
||||
--enable-nvdec \
|
||||
--enable-nvenc \
|
||||
--enable-libnpp \
|
||||
--nvcc=/usr/local/cuda/bin/nvcc \
|
||||
--extra-cflags=-I/usr/local/cuda/include \
|
||||
--extra-ldflags=-L/usr/local/cuda/lib64 \
|
||||
--extra-libs=-lcuda \
|
||||
--extra-libs=-lcudart \
|
||||
--extra-libs=-lnvcuvid \
|
||||
--extra-libs=-lnvidia-encode \
|
||||
--enable-libx264 \
|
||||
--enable-libx265 \
|
||||
--enable-libvpx \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue