Skip to content

Commit

Permalink
Ubuntu 24.04で、cudaのインストールできるように。
Browse files Browse the repository at this point in the history
パッケージの一部のみを導入するようにする。
  • Loading branch information
rigaya committed Apr 30, 2024
1 parent 35c0e04 commit 64cb86f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docker/docker_ubuntu2404_cuda11
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
FROM ubuntu:24.04

ARG DEBIAN_FRONTEND=noninteractive \
OSVER=ubuntu2404 \
OSVER=ubuntu2204 \
LOCAL_USER_ID=1000 \
LOCAL_GROUP_ID=1000 \
CUDA_VER_MAJOR=11 \
CUDA_VER_MINOR=8 \
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
Expand Down Expand Up @@ -33,10 +35,11 @@ RUN apt update \
&& dpkg -i ${CUDA_DEB_NAME} \
&& cp ${CUDA_GPG_PATH}/cuda-*-keyring.gpg /usr/share/keyrings/ \
&& apt-get update \
&& apt-get -y install cuda \
&& apt-get -y install cuda-compiler-${CUDA_VER_MAJOR}-${CUDA_VER_MINOR} cuda-libraries-dev-${CUDA_VER_MAJOR}-${CUDA_VER_MINOR} cuda-nvml-dev-${CUDA_VER_MAJOR}-${CUDA_VER_MINOR} \
&& rm -f ${CUDA_DEB_NAME} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/local/cuda-${CUDA_VER_MAJOR}.${CUDA_VER_MINOR} /usr/local/cuda

RUN useradd -u $LOCAL_USER_ID -m --user-group --shell /bin/bash rigaya
RUN groupmod -og $LOCAL_GROUP_ID rigaya
Expand Down

0 comments on commit 64cb86f

Please sign in to comment.