Skip to content

Commit

Permalink
internet too slow to test nvhpc rn
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Mar 23, 2024
1 parent 4bca50e commit b950fec
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/run_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
dockerfile:
- Dockerfile.intel
- Dockerfile.nvhpc
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
40 changes: 40 additions & 0 deletions docker/Dockerfile.nvhpc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# nvidia rate limits requests. You can get around this by restarting docker if for
# some reason you have to build this image many times
# https://stackoverflow.com/a/75757516/5217293
#
# Container versions, and sizes, can be found at https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nvhpc/tags
#
FROM nvcr.io/nvidia/nvhpc:23.7-devel-cuda12.2-ubuntu22.04

# Install necessary dependencies
RUN apt update -y && \
apt install -y \
bzip2 \
cmake \
libcurl4-openssl-dev \
libhdf5-dev \
git \
m4 \
make \
unzip \
wget \
zlib1g-dev \
&& apt clean all

# Set working directory
WORKDIR /usr/local/src

COPY . netcdf-c

# Set environment variables for nvidia compilers
ENV CXX=nvc++
ENV CC=nvc
ENV FC=nvfortran

# Build and install NetCDF
WORKDIR /usr/local/src/netcdf-c
RUN cmake -S . -B build && \
cd build && make -j && \
make install

WORKDIR /usr/local/src/netcdf-c/build

0 comments on commit b950fec

Please sign in to comment.