Skip to content

Commit

Permalink
Ubuntu 24.04向けパッケージビルドを作成。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Apr 30, 2024
1 parent a39eb4c commit 9733671
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
fail-fast: false
matrix:
include:
- dockerimg: ubuntu2404_cuda11
pkgtype: deb
arch: x86_64
- dockerimg: ubuntu2204_cuda11
pkgtype: deb
arch: x86_64
Expand Down
3 changes: 3 additions & 0 deletions build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ if [ -e /etc/lsb-release ]; then
elif [ "${PACKAGE_OS_CODENAME}" = "jammy" ]; then
PACKAGE_DEPENDS="libc6(>=2.22),libstdc++6(>=6)"
PACKAGE_DEPENDS="${PACKAGE_DEPENDS},libavcodec58,libavutil56,libavformat58,libswresample3,libavfilter7,libavdevice58,libass9"
elif [ "${PACKAGE_OS_CODENAME}" = "noble" ]; then
PACKAGE_DEPENDS="libc6(>=2.22),libstdc++6(>=6)"
PACKAGE_DEPENDS="${PACKAGE_DEPENDS},libavcodec60,libavutil58,libavformat60,libswresample4,libavfilter9,libavdevice60,libass9"
else
echo "${PACKAGE_OS_ID}${PACKAGE_OS_VER} ${PACKAGE_OS_CODENAME} not supported in this script!"
exit 1
Expand Down
47 changes: 47 additions & 0 deletions docker/docker_ubuntu2404_cuda11
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive \
OSVER=ubuntu2404 \
LOCAL_USER_ID=1000 \
LOCAL_GROUP_ID=1000 \
CUDA_DEB_URL=https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \
CUDA_DEB_NAME=cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb \
CUDA_GPG_PATH=/var/cuda-repo-ubuntu2204-11-8-local

RUN apt update \
&& apt-get install -y \
wget \
git \
build-essential \
libavcodec60 \
libavcodec-dev \
libavutil58 \
libavutil-dev \
libavformat60 \
libavformat-dev \
libswresample4 \
libswresample-dev \
libavfilter9 \
libavfilter-dev \
libavdevice60 \
libavdevice-dev \
libass9 \
libass-dev \
&& wget -q https://developer.download.nvidia.com/compute/cuda/repos/${OSVER}/x86_64/cuda-${OSVER}.pin \
&& mv cuda-${OSVER}.pin /etc/apt/preferences.d/cuda-repository-pin-600 \
&& wget -q ${CUDA_DEB_URL} \
&& dpkg -i ${CUDA_DEB_NAME} \
&& cp ${CUDA_GPG_PATH}/cuda-*-keyring.gpg /usr/share/keyrings/ \
&& apt-get update \
&& apt-get -y install cuda \
&& rm -f ${CUDA_DEB_NAME} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN useradd -u $LOCAL_USER_ID -m --user-group --shell /bin/bash rigaya
RUN groupmod -og $LOCAL_GROUP_ID rigaya
WORKDIR /home/rigaya
COPY . .
RUN chown -R rigaya:rigaya .
USER rigaya

0 comments on commit 9733671

Please sign in to comment.