Skip to content

Commit

Permalink
Use common nvidia dependency installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Apr 1, 2024
1 parent b5aa950 commit 1885d0f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Build and push platforms vkfft
uses: docker/build-push-action@v5
with:
context: docker
context: .
file: docker/Dockerfile.vkfft
platforms: linux/amd64,linux/arm64
push: true
Expand Down
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,12 @@ LABEL maintainer="Charlie Lewis <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ENV UHD_IMAGES_DIR /usr/share/uhd/images
ENV PATH="${PATH}:/root/.local/bin"
WORKDIR /root
COPY bin/install-nv.sh /root
RUN mkdir -p /data/gamutrf
# install nvidia's vulkan support if x86.
# hadolint ignore=DL3008
RUN if [ "$(arch)" = "x86_64" ] ; then \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates dirmngr gpg-agent gpg wget && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/3bf863cc.pub" && \
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/ /" | tee /etc/apt/sources.list.d/nvidia.list && \
apt-get update && \
apt-get install -y --no-install-recommends libnvidia-gl-550 ; \
fi && \
RUN if [ "$(arch)" = "x86_64" ] ; then /root/install-nv.sh ; fi && \
apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
libblas3 \
Expand Down
8 changes: 8 additions & 0 deletions bin/install-nv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates dirmngr gpg-agent gpg wget && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/3bf863cc.pub" && \
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/ /" | tee /etc/apt/sources.list.d/nvidia.list && \
apt-get update && \
apt-get install -y --no-install-recommends libnvidia-gl-550
16 changes: 5 additions & 11 deletions docker/Dockerfile.vkfft
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libvulkan-dev \
python3-dev
WORKDIR /root
RUN git clone https://github.com/DTolm/VkFFT -b v1.3.3
RUN git clone https://github.com/DTolm/VkFFT -b v1.3.4
WORKDIR /root/VkFFT/build
RUN CMAKE_BUILD_TYPE=Release cmake -DGLSLANG_GIT_TAG=13.0.0 .. && make -j "$(nproc)"

FROM ubuntu:22.04
# TODO: ideally, should be packaged such that cmake can find it.
# hadolint ignore=DL3008
RUN if [ "$(arch)" = "x86_64" ] ; then \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates dirmngr gpg-agent gpg wget && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/3bf863cc.pub" && \
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$(arch)/ /" | tee /etc/apt/sources.list.d/nvidia.list && \
apt-get update && \
apt-get install -y --no-install-recommends libnvidia-gl-545 ; \
fi && \
apt-get update && apt-get install -y --no-install-recommends \
libvulkan1
WORKDIR /root
COPY bin/install-nv.sh /root
RUN if [ "$(arch)" = "x86_64" ] ; then /root/install-nv.sh ; fi && \
apt-get update && apt-get install -y --no-install-recommends libvulkan1
COPY --from=vkfft-builder /root/VkFFT /root/VkFFT
CMD ["/root/VkFFT/build/VkFFT_TestSuite", "-devices"]

Expand Down

0 comments on commit 1885d0f

Please sign in to comment.