-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
57 lines (43 loc) · 1.5 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
FROM ubuntu
LABEL Description="Sparse2D"
SHELL ["/bin/bash", "-c"]
WORKDIR /workdir
ARG DEBIAN_FRONTEND=noninteractive
ARG CC=gcc-13
ARG CXX=g++-13
RUN apt-get update && \
apt-get install -y autoconf automake libtool pkg-config libgl1 libglx-mesa0 && \
apt-get install -y gcc-13 g++-13 && \
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 install -y python3 python3-pip python3-venv && \
apt-get clean
RUN cd /home && \
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.8.0.tar.gz && \
tar -xvf v3.8.0.tar.gz && \
cd Catch2-3.8.0 && \
cmake -Bbuild -H. -DBUILD_TESTING=OFF && \
cmake --build build/ --target install
ENV HEALPIX /usr/share/healpy
RUN python3 -m venv /venv
RUN source /venv/bin/activate && \
pip install --upgrade pip
RUN source /venv/bin/activate && \
pip install jupyter
COPY . /home
RUN source /venv/bin/activate && \
cd /home && \
mkdir build && \
cd build && \
cmake .. && \
make -j8 && \
make install
ENV PYTHONPATH /home/build/src
RUN echo "source /venv/bin/activate" >> ~/.bashrc
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