Skip to content

Commit

Permalink
Merge pull request #89 from open-quantum-safe/ps-nvcc
Browse files Browse the repository at this point in the history
Install NVCC on ubuntu-latest to run cuPQC build tests
  • Loading branch information
praveksharma authored Jan 21, 2025
2 parents 7f2a604 + cf63f1d commit 775c09c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ubuntu-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ FROM ubuntu:latest
WORKDIR /root
COPY --from=build /usr/local/bin/actionlint /usr/local/bin/actionlint

ARG ARCH
ENV ARCH=${ARCH}

RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
Expand Down Expand Up @@ -73,5 +76,21 @@ RUN opam init --yes --auto-setup && opam install --confirm-level=unsafe-yes --de
# install ajv for CBOM validation
RUN npm -g install ajv ajv-cli

# install nvcc for building with OQS_USE_CUPQC=ON on x86_64
RUN if [ "$ARCH" = "x86_64" ]; then \
apt-key del 7fa2af80 && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
apt-get update && \
apt-get install -y cuda-toolkit && \
echo PATH=/usr/local/cuda-12.6/bin${PATH:+:${PATH}} >> .bashrc && \
echo LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64 \
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} >> .bashrc && \
wget https://developer.download.nvidia.com/compute/cupqc/redist/cupqc/cupqc-pkg-0.2.0.tar.gz && \
mkdir /cupqc && \
tar -xzvf cupqc-pkg-0.2.0.tar.gz -C /cupqc && \
echo cuPQC_DIR="/cupqc/cupqc/cupqc-pkg-0.2.0/cmake/" >> .bashrc; \
fi

# Activate if we want to test specific OpenSSL3 versions:
# RUN cd /root && git clone --depth 1 --branch openssl-3.0.7 https://github.com/openssl/openssl.git && cd openssl && LDFLAGS="-Wl,-rpath -Wl,/usr/local/openssl3/lib64" ./config --prefix=/usr/local/openssl3 && make -j && make install

0 comments on commit 775c09c

Please sign in to comment.