Skip to content

Commit

Permalink
Ubuntu 24.04 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Perl committed Nov 26, 2024
1 parent 2ca2b9b commit fcbcb3c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 40 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
build-linux:
name: build in native linux
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,19 +59,19 @@ jobs:
build-docker:
name: build in docker
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: pull base image
id: ubuntu_pull
run: |
docker pull ubuntu:22.04
docker pull ubuntu:24.04
- name: run if ubuntu_pull failed
if: failure() && steps.ubuntu_pull.outcome == 'failure'
run: |
docker pull ubuntu:22.04
docker pull ubuntu:24.04
- name: build ffmpeg
run: |
docker build -t ffmpeg:ubuntu -f Dockerfile .
Expand All @@ -89,12 +89,12 @@ jobs:
- name: pull base image
id: cuda_ubuntu_pull
run: |
docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04
docker pull nvidia/cuda:12.6.2-devel-ubuntu22.04
docker pull ubuntu:22.04
- name: run if cuda_ubuntu_pull failed
if: failure() && steps.cuda_ubuntu_pull.outcome == 'failure'
run: |
docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04
docker pull nvidia/cuda:12.6.2-devel-ubuntu22.04
docker pull ubuntu:22.04
- name: build ffmpeg
run: |
Expand All @@ -113,11 +113,11 @@ jobs:
- name: pull base image
id: cuda_ubuntu_pull
run: |
docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04
docker pull nvidia/cuda:12.6.2-devel-ubuntu22.04
- name: run if cuda_ubuntu_pull failed
if: failure() && steps.cuda_ubuntu_pull.outcome == 'failure'
run: |
docker pull nvidia/cuda:11.8.0-devel-ubuntu22.04
docker pull nvidia/cuda:12.6.2-devel-ubuntu22.04
- name: build ffmpeg
run: |
docker build -t ffmpeg:cuda-static -f full-static.dockerfile .
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:22.04 AS build
FROM ubuntu:24.04 AS build

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
python3 python-is-python3 ninja-build meson git \
python3 python-is-python3 ninja-build meson git curl \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
&& update-ca-certificates

Expand All @@ -13,9 +13,9 @@ COPY ./build-ffmpeg /app/build-ffmpeg

RUN SKIPINSTALL=yes /app/build-ffmpeg --build

FROM ubuntu:22.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# install va-driver
RUN apt-get update \
Expand Down
43 changes: 17 additions & 26 deletions cuda-ubuntu.dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
ARG CUDAVER=12.2.2
ARG CUDAVER=12.6.2
ARG UBUNTUVER=22.04

FROM nvidia/cuda:${CUDAVER}-devel-ubuntu${UBUNTUVER} AS build

ENV DEBIAN_FRONTEND noninteractive
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video

RUN apt-get update && \
apt-get upgrade -y && \
apt-get -y --no-install-recommends install \
build-essential \
curl \
libva-dev \
python3 \
python-is-python3 \
ninja-build \
meson \
cmake \
git && \
# clean
apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN apt-get update \
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
python3 python-is-python3 ninja-build meson git curl \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
&& update-ca-certificates

# build and move deviceQuery to /usr/bin
RUN mkdir -p /code && \
Expand All @@ -36,21 +27,21 @@ RUN CUDA_COMPUTE_CAPABILITY=$(deviceQuery | grep Capability | head -n 1 | awk 'E

FROM ubuntu:${UBUNTUVER} AS release

ENV DEBIAN_FRONTEND noninteractive
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video

# install va-driver
RUN apt-get update \
&& apt-get -y install libva-drm2 \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

# Copy libnpp
COPY --from=build /usr/local/cuda-12.2/targets/x86_64-linux/lib/libnppc.so /lib/x86_64-linux-gnu/libnppc.so.12
COPY --from=build /usr/local/cuda-12.2/targets/x86_64-linux/lib/libnppig.so /lib/x86_64-linux-gnu/libnppig.so.12
COPY --from=build /usr/local/cuda-12.2/targets/x86_64-linux/lib/libnppicc.so /lib/x86_64-linux-gnu/libnppicc.so.12
COPY --from=build /usr/local/cuda-12.2/targets/x86_64-linux/lib/libnppidei.so /lib/x86_64-linux-gnu/libnppidei.so.12
COPY --from=build /usr/local/cuda-12.2/targets/x86_64-linux/lib/libnppif.so /lib/x86_64-linux-gnu/libnppif.so.12
COPY --from=build /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnppc.so /lib/x86_64-linux-gnu/libnppc.so.12
COPY --from=build /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnppig.so /lib/x86_64-linux-gnu/libnppig.so.12
COPY --from=build /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnppicc.so /lib/x86_64-linux-gnu/libnppicc.so.12
COPY --from=build /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnppidei.so /lib/x86_64-linux-gnu/libnppidei.so.12
COPY --from=build /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnppif.so /lib/x86_64-linux-gnu/libnppif.so.12

# Copy ffmpeg
COPY --from=build /app/workspace/bin/ffmpeg /usr/bin/ffmpeg
Expand Down
2 changes: 1 addition & 1 deletion full-static.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04 AS build
FROM ubuntu:24.04 AS build

ENV DEBIAN_FRONTEND=noninteractive
ENV NVIDIA_VISIBLE_DEVICES=all
Expand Down

0 comments on commit fcbcb3c

Please sign in to comment.