-
Notifications
You must be signed in to change notification settings - Fork 37
/
Dockerfile.nvcc
54 lines (40 loc) · 2.34 KB
/
Dockerfile.nvcc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM nvidia/cuda:11.6.1-devel-ubuntu20.04
RUN apt-get clean && apt-get update -y && \
DEBIAN_FRONTEND="noninteractive" TZ=America/New_York apt-get install -y --no-install-recommends git python3-minimal libpython3-stdlib bc hwloc wget openssh-client python3-numpy python3-h5py python3-matplotlib python3-scipy python3-pip lcov curl cuda-nsight-systems-11-6 cmake ninja-build
RUN pip3 install unyt
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" > /etc/apt/sources.list.d/llvm.list
RUN apt-get clean && apt-get update -y && \
DEBIAN_FRONTEND="noninteractive" TZ=America/New_York apt-get install -y --no-install-recommends clang-15 llvm-15 libomp-15-dev && \
rm -rf /var/lib/apt/lists/*
RUN cd /tmp && \
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.bz2 && \
tar xjf openmpi-4.1.4.tar.bz2 && \
cd openmpi-4.1.4 && \
./configure --prefix=/opt/openmpi --enable-mpi-cxx --with-cuda && \
make -j16 && \
make install && \
cd / && \
rm -rf /tmp/openmpi*
ENV LD_LIBRARY_PATH=/opt/openmpi/lib:$LD_LIBRARY_PATH \
PATH=/opt/openmpi/bin:$PATH
RUN cd /tmp && \
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz && \
tar xzf hdf5-1.12.2.tar.gz && \
cd hdf5-1.12.2 && \
mkdir -p /usr/local/hdf5/serial /usr/local/hdf5/parallel && \
./configure --prefix=/usr/local/hdf5/serial --enable-hl --enable-build-mode=production && make -j16 && make install && make clean && \
./configure --prefix=/usr/local/hdf5/parallel --enable-hl --enable-build-mode=production --enable-parallel && make -j16 && make install && \
cd / && \
rm -rf /tmp/hdf5-1.12.2*
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.23.2/cmake-3.23.2-linux-x86_64.tar.gz -o cmake-3.23.2-linux-x86_64.tar.gz && \
tar -xzf cmake-3.23.2-linux-x86_64.tar.gz -C /opt
ENV PATH=/opt/cmake-3.23.2-linux-x86_64/bin:$PATH
COPY build_ascent_cuda.sh /tmp/build-ascent/build_ascent_cuda.sh
RUN cd /tmp/build-ascent && \
bash build_ascent_cuda.sh && \
cd / && \
rm -rf /tmp/build-ascent
# manually downgrade numpy as deprecated `typeDict` is still used by h5py
RUN pip install numpy==1.21