forked from SSAGESLabs/PySAGES
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-base
31 lines (25 loc) · 1.7 KB
/
Dockerfile-base
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND="noninteractive" TZ="Chicago/United States"
# Install system dependencies
RUN apt-get update && apt-get install -y gpg wget
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get update && apt-get install -y python3 cmake nvidia-cuda-toolkit git libopenmpi-dev
RUN apt-get update && apt-get install -y gcc-8 g++-8 python-is-python3 python3-pip
RUN apt-get update && apt-get install -y doxygen swig nvidia-cuda-dev nvidia-cuda-toolkit python3-setuptools cython3
# Install python dependencies
RUN python -m pip install --upgrade pip
RUN python -m pip install "numpy<2"
RUN env MPICC=$(which mpicc) python -m pip install mpi4py
ENV CC=gcc-8
ENV CXX=g++-8
# Install HOOMD-blue
RUN git clone https://github.com/glotzerlab/hoomd-blue.git && cd hoomd-blue && git checkout v2.9.7 && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/hoomd-install -DENABLE_CUDA=ON -DENABLE_MPI=ON .. && make -j $(nproc) install
ENV PYTHONPATH=${PYTHONPATH}:/hoomd-install
# Install OpenMM
RUN git clone https://github.com/openmm/openmm.git && cd openmm && git checkout 7.6.0 && mkdir build && cd build && cmake -DPYTHON_EXECUTABLE=`which python3` -DCMAKE_INSTALL_PREFIX=../install -DBUILD_TESTING=OFF .. && make -j $(nproc) install
ENV OPENMM_INCLUDE_PATH=/openmm/install/include
ENV OPENMM_LIB_PATH=/openmm/install/lib
RUN cd openmm/build/python && python3 setup.py install