-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.demo
53 lines (39 loc) · 1.84 KB
/
Dockerfile.demo
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
FROM continuumio/miniconda3:4.7.10
MAINTAINER Danny Goldstein <[email protected]>
# Install astromatic software
RUN conda install -c conda-forge astromatic-swarp astromatic-source-extractor \
astromatic-scamp
RUN conda install pip
# Install hotpants
RUN apt-get update && apt-get install -y libcfitsio-dev libcurl4-openssl-dev postgresql-client postgresql \
libpq-dev make gcc libbz2-dev curl gfortran g++ && \
git clone https://github.com/zuds-survey/hotpants.git && \
cd hotpants && LIBS="-lm -lcfitsio -lcurl" make -e && \
cp hotpants $CONDA_PREFIX/bin && cd -
# Install mpi4py so things can run at nersc
RUN curl -SL http://www.mpich.org/static/downloads/3.2/mpich-3.2.tar.gz \
-o mpich-3.2.tar.gz \
&& tar -xzf mpich-3.2.tar.gz \
&& cd mpich-3.2 \
&& CC="gcc" CXX="g++" CFLAGS="-O3 -fPIC -pthread" CXXFLAGS="-O3 -fPIC -pthread" ./configure --prefix=/usr \
&& make -j 4 && make install \
&& cd .. \
&& rm -rf mpich-3.2*
RUN curl -SL https://files.pythonhosted.org/packages/04/f5/a615603ce4ab7f40b65dba63759455e3da610d9a155d4d4cece1d8fd6706/mpi4py-3.0.2.tar.gz \
-o mpi4py-3.0.2.tar.gz \
&& tar xzf mpi4py-3.0.2.tar.gz \
&& cd mpi4py-3.0.2 \
&& python setup.py build --mpicc="mpicc" --mpicxx="mpicxx" \
&& python setup.py install \
&& cd .. \
&& rm -rf mpi4py*
RUN curl https://portal.nersc.gov/cfs/m937/demo.tar.gz -o ~/demo.tar.gz && \
mkdir ~/.data && cd ~/.data && tar -xvzf ../demo.tar.gz && \
rm ../demo.tar.gz
RUN pip install jupyter
SHELL ["/bin/bash", "-c"]
RUN mkdir zuds-pipeline && mkdir zuds-pipeline/zuds
ADD setup.py requirements.txt zuds-pipeline/
ADD zuds zuds-pipeline/zuds/
RUN cd zuds-pipeline && pip install --no-cache-dir . && cd -
ENTRYPOINT ["jupyter", "notebook", "--no-browser", "--port=8888", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''"]