diff --git a/.dockerignore b/.dockerignore index 6e19512..989d80b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ .dockerignore +.git Dockerfile diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a95c2e1..ce1a5a8 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -41,6 +41,7 @@ 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 @@ -48,9 +49,9 @@ jobs: 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 @@ -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 diff --git a/Dockerfile b/Dockerfile index bb05c68..7b7e1b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ @@ -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