Skip to content

Commit

Permalink
Merge pull request #972 from 36000/cuda12
Browse files Browse the repository at this point in the history
[ENH] add CUDA 12 compat to GPU tractography
  • Loading branch information
36000 authored Jun 14, 2023
2 parents 0ba5913 + bea2cb1 commit 6259b19
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
13 changes: 7 additions & 6 deletions gpu_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM nvcr.io/nvidia/cuda:11.0.3-devel
ARG NVIDIAVERSION=11.0.3-devel
FROM nvidia/cuda:${NVIDIAVERSION}

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

# upgrade
RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
RUN rm -f /etc/apt/sources.list.d/nvidia-ml.list
RUN apt update && \
apt install --assume-yes apt-transport-https \
ca-certificates gnupg \
Expand All @@ -17,10 +18,10 @@ RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main"
RUN apt install -y cmake libncurses5-dev libtinfo6

# Anaconda
RUN cd /opt && wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh \
&& bash /tmp/Anaconda3-2022.10-Linux-x86_64.sh -b -p /opt/anaconda \
&& rm -rf /tmp/Anaconda3-2022.10-Linux-x86_64.sh \
&& eval "$(/opt/anaconda/bin/conda shell.bash hook)"
RUN wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
RUN bash /tmp/Anaconda3-2022.10-Linux-x86_64.sh -b -p /opt/anaconda
RUN rm -rf /tmp/Anaconda3-2022.10-Linux-x86_64.sh
RUN cd /opt && eval "$(/opt/anaconda/bin/conda shell.bash hook)"
ENV PATH /opt/anaconda/bin:${PATH}
ENV LD_LIBRARY_PATH /opt/anaconda/lib:${LD_LIBRARY_PATH}

Expand Down
14 changes: 12 additions & 2 deletions gpu_docker/docker-build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
COMMIT=${1}
COMMIT="$(echo "${COMMIT}" | tr -d '[:space:]')"
export COMMIT
NO_TAG="ghcr.io/${2}/pyafq_gpu"

NO_TAG="ghcr.io/${2}/pyafq_gpu_cuda_11"
TAG="${NO_TAG}:${COMMIT}"
TAG2="${NO_TAG}:latest"
TAG="$(echo "${TAG}" | tr -d '[:space:]')"
TAG2="$(echo "${TAG2}" | tr -d '[:space:]')"

echo $TAG
docker build --no-cache -t $TAG -t $TAG2 --build-arg COMMIT ./gpu_docker

NVIDIAVERSION="12.0.1-devel-ubuntu20.04"
export NVIDIAVERSION
NO_TAG="ghcr.io/${2}/pyafq_gpu_cuda_12"
TAG="${NO_TAG}:${COMMIT}"
TAG2="${NO_TAG}:latest"
TAG="$(echo "${TAG}" | tr -d '[:space:]')"
TAG2="$(echo "${TAG2}" | tr -d '[:space:]')"
echo $TAG
docker build --no-cache -t $TAG -t $TAG2 --build-arg COMMIT --build-arg NVIDIAVERSION ./gpu_docker
7 changes: 6 additions & 1 deletion gpu_docker/docker-push.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
NO_TAG="ghcr.io/${1}/pyafq_gpu"
NO_TAG="ghcr.io/${1}/pyafq_gpu_cuda_11"
NO_TAG="$(echo "${NO_TAG}" | tr -d '[:space:]')"

docker push --all-tags $NO_TAG

NO_TAG="ghcr.io/${1}/pyafq_gpu_cuda_12"
NO_TAG="$(echo "${NO_TAG}" | tr -d '[:space:]')"

docker push --all-tags $NO_TAG

0 comments on commit 6259b19

Please sign in to comment.