forked from spacetelescope/roman_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (61 loc) · 2.34 KB
/
Dockerfile
File metadata and controls
75 lines (61 loc) · 2.34 KB
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
FROM jupyter/scipy-notebook:db3ee82ad08a
MAINTAINER Space Telescope Science Institute <help@stsci.edu>
# Note: this is ordered roughly by how often things are expected
# to change (ascending). That way, only the last few changed steps
# are rebuilt on push.
WORKDIR $HOME
#
# Install reference data under /opt
#
USER root
RUN mkdir -p /opt
RUN chown $NB_USER /opt
USER $NB_USER
WORKDIR /opt
# Extract PySynphot reference data
RUN wget -qO- http://ssb.stsci.edu/cdbs/tarfiles/synphot1.tar.gz | tar xvz
RUN wget -qO- http://ssb.stsci.edu/cdbs/tarfiles/synphot2.tar.gz | tar xvz
RUN wget -qO- http://ssb.stsci.edu/cdbs/tarfiles/synphot5.tar.gz | tar xvz
ENV PYSYN_CDBS /opt/grp/hst/cdbs
# Extract Pandeia reference data
RUN wget -qO- http://ssb.stsci.edu/pandeia/engine/1.3/pandeia_data-1.3_wfirst.tar.gz | tar xvz
ENV pandeia_refdata /opt/pandeia_data-1.3_wfirst_release
# Extract WebbPSF reference data
# (note: version number env vars are declared close to where they are used
# to prevent unnecessary rebuilds of the Docker image)
ENV WEBBPSF_DATA_VERSION 0.7.0
RUN wget -qO- http://www.stsci.edu/~mperrin/software/webbpsf/webbpsf-data-$WEBBPSF_DATA_VERSION.tar.gz | tar xvz
ENV WEBBPSF_PATH /opt/webbpsf-data
WORKDIR $HOME
# Prepare environment variables
ENV PYHOME /opt/conda
ENV PYTHON_VERSION 3.6
ENV PATH $HOME/bin:$PATH
ENV LD_LIBRARY_PATH $HOME/lib:$LD_LIBRARY_PATH
# Enable conda-forge package list
RUN conda config --add channels conda-forge
# Configure AstroConda
RUN conda config --system --add channels http://ssb.stsci.edu/astroconda
# Install WFIRST Simulation Tools dependencies for python2 and python3
# from conda:
ENV EXTRA_PACKAGES astropy=2.0.6 pyfftw pysynphot photutils future pyyaml pandas
RUN conda install --quiet --yes $EXTRA_PACKAGES && \
conda clean -tipsy
RUN pip install ipywidgets==7.0.0
# Install Pandeia
ENV PANDEIA_VERSION 1.3
RUN pip install --no-cache-dir pandeia.engine==$PANDEIA_VERSION
# Install WebbPSF
ENV WEBBPSF_VERSION 0.7.0
#RUN pip install --no-cache-dir webbpsf==$WEBBPSF_VERSION
RUN pip install git+git://github.com/spacetelescope/webbpsf.git@master
RUN pip install git+git://github.com/spacetelescope/poppy.git
#
# Prepare files and permissions
#
# Copy notebooks into place
# (n.b. This must be last because otherwise Dockerfile edits
# invalidate the build cache)
COPY ./notebooks/* $HOME/
USER root
RUN chown -R $NB_USER $HOME/