Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.dockerignore
.git
Dockerfile
14 changes: 8 additions & 6 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y libcfitsio-dev
sudo apt-get install -y libfftw3-dev
sudo apt-get install -y libarmadillo-dev
sudo apt-get install -y libgsl-dev
sudo apt-get install -y libsharp-dev
sudo apt-get install -y libhealpix-cxx-dev
sudo apt-get install -y healpy-data
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
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
sudo cmake --build build/ --target install
cd
Expand Down Expand Up @@ -99,12 +100,13 @@ jobs:
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y libcfitsio-dev
sudo apt-get install -y python3
sudo apt-get install -y python3-pip
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
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
sudo cmake --build build/ --target install
cd
Expand Down
37 changes: 19 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ SHELL ["/bin/bash", "-c"]
WORKDIR /workdir

ARG DEBIAN_FRONTEND=noninteractive
ARG CC=gcc-9
ARG CXX=g++-9
ARG CC=gcc-13
ARG CXX=g++-13

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 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 && \
Expand All @@ -20,37 +20,38 @@ RUN apt-get update && \
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 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 && \
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 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
RUN python3 -m venv /venv

ENV PATH /miniconda/envs/sparse2d/bin:${PATH}
RUN source /venv/bin/activate && \
pip install --upgrade pip

RUN pip install pybind11 jupyter
RUN source /venv/bin/activate && \
pip install jupyter

COPY . /home

RUN cd /home && \
RUN source /venv/bin/activate && \
cd /home && \
mkdir build && \
cd build && \
cmake .. && \
make && \
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
Loading