This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
84 lines (61 loc) · 3.08 KB
/
Dockerfile
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM ubuntu:16.04
MAINTAINER Rollin Thomas
# Update and install prerequisites
RUN \
apt-get update && \
apt-get install -y \
build-essential \
gfortran \
python \
python-pip \
python-mysqldb \
zlib1g-dev
# Install python packages
RUN \
pip install astropy
# Install MPICH
ADD http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz \
/usr/local/src/
RUN \
cd /usr/local/src && \
tar xf mpich-3.2.tar.gz && \
cd mpich-3.2 && \
./configure && \
make -j 2 && \
make install && \
cd /usr/local/src && \
rm -rf mpich-3.2
# Install mpi4py
ADD https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-2.0.0.tar.gz \
/usr/local/src/
RUN \
cd /usr/local/src && \
tar zxf mpi4py-2.0.0.tar.gz && \
cd mpi4py-2.0.0 && \
python setup.py build && \
python setup.py install && \
cd /usr/local/src && \
rm -rf mpi4py-2.0.0
# Install mpi4py-import benchmark script and benchmark script
ADD scripts/mpi4py-import.py /usr/local/bin
RUN chmod a+x /usr/local/bin/mpi4py-import.py
ADD scripts/report-benchmark.py /usr/local/bin
RUN chmod a+x /usr/local/bin/report-benchmark.py
# Confine astropy cache and config to container.
ENV XDG_CACHE_HOME=/srv/cache
RUN mkdir -p $XDG_CACHE_HOME/astropy
ENV XDG_CONFIG_HOME=/srv/config
RUN mkdir -p $XDG_CONFIG_HOME/astropy
RUN python -c "import astropy"
# Install pynamic v1.3
ADD https://github.com/LLNL/pynamic/archive/1.3.tar.gz \
/opt
RUN \
cd /opt && \
tar zxf 1.3.tar.gz && \
cd pynamic-1.3/pynamic-pyMPI-2.6a1 && \
python ./config_pynamic.py 495 1850 -e -u 215 1850 -n 100 -t ; exit 0
# Little extra kick for Pynamic
RUN \
echo /opt/pynamic-1.3/pynamic-pyMPI-2.6a1 >> /etc/ld.so.conf && \
ldconfig