1+ FROM ubuntu:18.04 as base
2+
3+ SHELL ["/bin/bash" , "-c" ]
4+
5+ RUN mkdir -p /Downloads
6+
7+ ENV DEBIAN_FRONTEND=noninteractive
8+ RUN apt-get update && \
9+ apt-get install -y tzdata && \
10+ ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
11+ dpkg-reconfigure --frontend noninteractive tzdata && \
12+ apt-get install -y build-essential wget git-core libtool libtool-bin \
13+ python3 python3-dev \
14+ curl psmisc iproute2 gfortran libssl-dev locales && \
15+ apt autoremove -y && \
16+ rm -rf /var/lib/apt/lists/* && \
17+ locale-gen en_US.UTF-8 && dpkg-reconfigure locales
18+
19+ ENV LANG en_US.UTF-8
20+ ENV LANGUAGE en_US:en
21+ ENV LC_ALL en_US.UTF-8
22+
23+ from base as build
24+
25+ RUN mkdir /spack && cd /spack && git clone https://github.com/spack/spack.git -b v0.23.1 --single-branch
26+
27+ RUN mkdir /sds && cd /sds && git clone https://github.com/mochi-hpc/mochi-spack-packages.git && cd mochi-spack-packages && git checkout 29a196f299130ff8039bdfdc9b22715f7e6991dc
28+
29+ RUN mkdir -p /opt/spack-environment
30+
31+ RUN echo "RESET 3" >> /dev/null
32+
33+ COPY env.yaml /opt/spack-environment/spack.yaml
34+
35+ # apparently spack needs unzip!
36+ RUN apt-get update && apt-get install unzip
37+ RUN source /spack/spack/share/spack/setup-env.sh && cd /opt/spack-environment && spack env activate . && spack concretize -f && spack install && spack gc -y && spack clean -a
38+ COPY modules.yaml /root/.spack
39+
40+
41+ # install conda environment with py-mochi services
42+ RUN cd /opt/spack-environment/ && \
43+ source /spack/spack/share/spack/setup-env.sh && \
44+ spack env activate . && \
45+ spack load pkgconf && \
46+ cd /Downloads/ && \
47+ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
48+ chmod u+x Miniconda3-latest-Linux-x86_64.sh && \
49+ ./Miniconda3-latest-Linux-x86_64.sh -p /conda -b && \
50+ source /conda/bin/activate && \
51+ conda create -n "conda-env" python=3.8.0 -y && \
52+ conda activate conda-env && \
53+ pip install wheel pybind11 pkgconfig && \
54+ git clone https://github.com/mochi-hpc/py-mochi-margo.git && \
55+ cd py-mochi-margo/ && \
56+ git checkout 976b14982f02bc98eac1b32052de5e8ec69fa081 && \
57+ python setup.py bdist_wheel && \
58+ pip install dist/pymargo-0.5.1-cp38-cp38-linux_x86_64.whl && \
59+ cd .. && \
60+ git clone https://github.com/mochi-hpc/py-mochi-sonata.git && \
61+ cd py-mochi-sonata/ && \
62+ git checkout 21ff608c81419470a26de645be5dad5d4aa35653 && \
63+ python setup.py bdist_wheel && \
64+ pip install dist/py_sonata-0.1-cp38-cp38-linux_x86_64.whl && \
65+ rm -rf /Downloads/*
66+
67+ # ensure shared libraries visible
68+ ENV LD_LIBRARY_PATH /opt/view/lib/
69+
70+ # python is now freed from the tyranny of spack!
71+
72+
73+ # install provdb-python
74+ RUN source /conda/bin/activate && \
75+ conda activate conda-env && \
76+ cd /Downloads && \
77+ git clone https://github.com/CODARcode/PerformanceAnalysis.git && \
78+ cd PerformanceAnalysis/ && \
79+ git checkout 6be55788fcc962a0bbb4ae9191404328afcfbe90 && \
80+ cd scripts/provdb_python && \
81+ python setup.py bdist_wheel && \
82+ pip install dist/provdb_python-0.0.1-py3-none-any.whl && \
83+ rm -rf /Downloads/*
84+
85+ ENTRYPOINT ["/bin/bash" ]
0 commit comments