-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (24 loc) · 1.2 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
FROM continuumio/miniconda
# Update conda
RUN conda update -y conda
# Remove (large file sizes) MKL optimizations.
RUN conda install nomkl
# Install gcc required to pip install astropy
RUN apt-get update && apt-get -y install gcc
# Grab environment file for starkit
RUN wget https://raw.githubusercontent.com/starkit/starkit/master/starkit_env3.yml -q
# Create conda environment for starkit
RUN conda env create -n starkit --file ./starkit_env3.yml
# Grab requirements.txt
# TODO: Remove commit tag from starkit when fixed & might need to install it in release phase
ADD ./webapps/requirements.txt /tmp/requirements.txt
# Activate starkit env & install dependencies in it
RUN /bin/bash -c 'source activate starkit && pip install -r /tmp/requirements.txt'
# Add the code of webapps to /opt
ADD ./webapps /opt/webapps/
WORKDIR /opt/webapps
# Download test grid in working dir (TODO: Put in release phase)
RUN wget https://zenodo.org/record/2557923/files/phoenix_t4000_10000_w3000_9000_r3000.h5?download=1 -O test_grid.h5 -q
# Activate starkit env & run the spectrum.py as dash app
# TODO: Tie all single page apps in webapps/ in a multi-page dash app
CMD /bin/bash -c 'source activate starkit && gunicorn spectrum:server'