Skip to content

Commit

Permalink
trying something
Browse files Browse the repository at this point in the history
Signed-off-by: Bettina Heim <heimb@outlook.com>
  • Loading branch information
bettinaheim committed Oct 31, 2024
1 parent 44faa81 commit 7d298f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ jobs:
cuda_version=${{ matrix.cuda_version }}
base_image=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-{1}', matrix.platform, needs.config.outputs.devdeps_toolchain)] }}
ompidev_image=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-cu{1}-ompi', matrix.platform, matrix.cuda_version)] }}
${{ matrix.cuda_version != '11.8' && 'cuda_packages="cuda-cudart cuda-compiler libcublas-dev libcusolver libnvjitlink"' || '' }}
${{ matrix.cuda_version != '11.8' && 'cuda_packages=cuda-cudart cuda-compiler libcublas-dev libcusolver libnvjitlink' || '' }}
registry_cache_from: ${{ needs.metadata.outputs.cache_base }}
update_registry_cache: ${{ needs.metadata.outputs.cache_target }}
environment: ${{ needs.metadata.outputs.environment }}
Expand Down
11 changes: 7 additions & 4 deletions docker/build/devdeps.ext.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ ARG cuda_version=11.8
ARG base_image=ghcr.io/nvidia/cuda-quantum-devdeps:llvm-main
ARG ompidev_image=ghcr.io/nvidia/cuda-quantum-devdeps:cu11-ompi-main
FROM $ompidev_image AS ompibuild
ARG cuda_version
RUN if [ -z "${cuda_version}" ]; then \
echo -e "\e[01;31mError: Missing argument cuda_version.\e[0m" >&2; \
echo -e "\e[01;31mError: Missing argument cuda_version.\e[0m" >&2 && \
exit 1; \
fi && \
if [ -n "${CUDA_VERSION}" ] && [ "${CUDA_VERSION}" != "${cuda_version}" ]; then \
echo -e "\e[01;31mError: CUDA version ${CUDA_VERSION} in ompidev_image does not match ${cuda_version}.\e[0m" >&2; \
echo -e "\e[01;31mError: CUDA version ${CUDA_VERSION} in ompidev_image does not match ${cuda_version}.\e[0m" >&2 && \
exit 1; \
fi

FROM $base_image
Expand Down Expand Up @@ -166,9 +169,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends xz-utils \
# Install CUDA

ARG cuda_packages="cuda-cudart cuda-compiler libcublas-dev libcusolver"
RUN if [ -n "$(echo "$cuda_packages")" ]; then \
RUN if [ -n "$cuda_packages" ]; then \
arch_folder=$([ "$(uname -m)" == "aarch64" ] && echo sbsa || echo x86_64) \
&& cuda_packages=`printf '%s\n' $cuda_packages | xargs -I "{}" echo "{}"-$(echo ${CUDA_VERSION} | tr . -)` \
&& cuda_packages=`printf '%s\n' $cuda_packages | xargs -I {} echo {}-$(echo ${CUDA_VERSION} | tr . -)` \
&& wget -q "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$arch_folder/cuda-keyring_1.0-1_all.deb" \
&& dpkg -i cuda-keyring_1.0-1_all.deb \
&& apt-get update && apt-get install -y --no-install-recommends $cuda_packages \
Expand Down

0 comments on commit 7d298f1

Please sign in to comment.