-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
56 lines (41 loc) · 1.53 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
FROM ubuntu
LABEL Description="Sparse2D"
SHELL ["/bin/bash", "-c"]
WORKDIR /workdir
ARG DEBIAN_FRONTEND=noninteractive
ARG CC=gcc-9
ARG CXX=g++-9
RUN apt-get update && \
apt-get install -y autoconf automake libtool pkg-config libgl1-mesa-glx && \
apt-get install -y gcc-9 g++-9 && \
apt-get install -y cmake git wget && \
apt-get install -y libarmadillo-dev && \
apt-get install -y libcfitsio-dev && \
apt-get install -y libfftw3-dev && \
apt-get install -y libgsl-dev && \
apt-get install -y libsharp-dev && \
apt-get install -y libhealpix-cxx-dev && \
apt-get install -y healpy-data && \
apt-get clean
RUN wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.1.0.tar.gz && \
tar -xvf v3.1.0.tar.gz && \
cd Catch2-3.1.0 && \
cmake -Bbuild -H. -DBUILD_TESTING=OFF && \
cmake --build build/ --target install
ENV HEALPIX /usr/share/healpy
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda && \
rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH /miniconda/bin:${PATH}
RUN conda create -n sparse2d python=3.10 pip -y
ENV PATH /miniconda/envs/sparse2d/bin:${PATH}
RUN pip install pybind11 jupyter
COPY . /home
RUN cd /home && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install
ENV PYTHONPATH /home/build/src
RUN echo -e '#!/bin/bash\njupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root' > /usr/bin/notebook && chmod +x /usr/bin/notebook