-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
49 lines (38 loc) · 2.11 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
# Start from the latest release LSST stack image.
FROM lsstsqre/centos:7-stack-lsst_distrib-w_latest
# Information about image.
ARG BUILD_DATE
LABEL lsst-desc.imsim.maintainer="https://github.com/LSSTDESC/imSim"
LABEL lsst-desc.imsim.description="A Docker image combining the LSST Science Pipelines software stack and imSim (and its dependencies)."
LABEL lsst-desc.imsim.version="latest"
LABEL lsst-desc.imsim.build_date=$BUILD_DATE
WORKDIR /home/lsst
# Clone imSim and rubin_sim repos.
RUN git clone https://github.com/LSSTDESC/imSim.git &&\
git clone https://github.com/lsst/rubin_sim.git
# Pull out conda requirements for imSim (excluding stackvana)
RUN sed '/stackvana/d' imSim/etc/standalone_conda_requirements.txt > imSim/etc/docker_conda_requirements.txt
# 1) Install imSim Conda requirements
# 2) Install imSim pip requirements
# 3) Install rubin_sim
# 4) Install imSim
RUN source /opt/lsst/software/stack/loadLSST.bash &&\
setup lsst_distrib &&\
mamba install -y --file imSim/etc/docker_conda_requirements.txt &&\
python3 -m pip install batoid skyCatalogs==1.7.0-rc4 gitpython &&\
python3 -m pip install rubin_sim/ &&\
python3 -m pip install imSim/
WORKDIR /opt/lsst/software/stack
# Download Rubin Sim data.
RUN mkdir -p rubin_sim_data/sims_sed_library
RUN curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/rubin_sim_data/skybrightness_may_2021.tgz | tar -C rubin_sim_data -xz
RUN curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/rubin_sim_data/throughputs_2023_09_07.tgz | tar -C rubin_sim_data -xz
RUN curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/sed_library/seds_170124.tar.gz | tar -C rubin_sim_data/sims_sed_library -xz
# Set location of Rubin sim data (downloaded in step above).
ENV RUBIN_SIM_DATA_DIR /opt/lsst/software/stack/rubin_sim_data
# Set location of SED library (downloaded in step above).
ENV SIMS_SED_LIBRARY_DIR /opt/lsst/software/stack/rubin_sim_data/sims_sed_library
WORKDIR /home/lsst
# Make a script to activate the LSST stack
RUN echo "source /opt/lsst/software/stack/loadLSST.bash" >> .bashrc &&\
echo "setup lsst_distrib" >> .bashrc