-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
72 lines (58 loc) · 2.28 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Get base image
FROM ubuntu:18.04
MAINTAINER Maya Mallaby-Kay <[email protected]>
# Install base packages
RUN apt-get update && apt-get install -y \
automake \
build-essential \
cmake \
emacs \
gcc \
gfortran \
git \
libtool \
libcfitsio-dev \
libfftw3-dev \
libgsl-dev \
libchealpix-dev \
libopenmpi-dev \
python3 \
python3-pip \
vim \
wget
# Create a user called actdr4
RUN useradd -m -U actdr4
# Make a new workspace
RUN mkdir home/workspace
WORKDIR /usr/home/workspace
# Install python packages
RUN pip3 install astropy astropy-helpers cython healpy ipython jupyter numpy pip mpi4py numba toml image getdist camb
RUN pip3 install plotly
RUN pip3 install pandas
RUN pip3 install pymaster
# Install Pixell using the gcc compiler
RUN git clone https://github.com/simonsobs/pixell.git
WORKDIR /usr/home/workspace/pixell
RUN CC=gcc python3 setup.py build_ext -i
RUN CC=gcc python3 setup.py install
# Install Nawrapper
WORKDIR /usr/home/workspace
RUN git clone https://github.com/xzackli/nawrapper
WORKDIR /usr/home/workspace/nawrapper
RUN python3 setup.py build_ext -i
RUN python3 setup.py install
# Install pyactlike which is used for the likelihood
WORKDIR /usr/home/workspace
RUN wget https://lambda.gsfc.nasa.gov/data/suborbital/ACT/ACT_dr4/likelihoods/actpollite_python_dr4.01.tar.gz -O - | tar -xz
WORKDIR /usr/home/workspace/actpollite_python_dr4.01
RUN python3 setup.py build_ext -i
RUN python3 setup.py install
# Return to the workspace directory, make actdr4 the owner of the directory and switch from root to actdr4 user
WORKDIR /usr/home/workspace
RUN chown actdr4 /usr/home/workspace
USER actdr4
# Add data files and notebooks to the container we will later link a local directory to the 'data' directory in the container
ADD /Notebooks Notebooks
ADD /Data data
# Expose a port to run the notebook on later
EXPOSE 8888