From d88f36eb354af3f1d3d68a205b91c43589c7ca40 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Mon, 13 Nov 2023 11:47:57 +0100 Subject: [PATCH 01/12] Add tdqm python package --- package_lists/python_packages.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/package_lists/python_packages.txt b/package_lists/python_packages.txt index a18572b..62aa6e1 100644 --- a/package_lists/python_packages.txt +++ b/package_lists/python_packages.txt @@ -28,4 +28,5 @@ requests scikit-learn scipy statsmodels +tdqm uvicorn From 4a67e1ba5d0809b2fee2dab5965c8028f89289ac Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Mon, 13 Nov 2023 15:11:31 +0100 Subject: [PATCH 02/12] Add pybind11, cmake and python3-dev --- Dockerfile | 5 ++++- package_lists/python_packages.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 493c6c7..6d508e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele ca-certificates \ git \ build-essential \ + cmake \ ccache \ netbase \ zip \ @@ -85,7 +86,9 @@ RUN chmod +x install_scripts/install_phantomjs.sh &&\ COPY package_lists/python_packages.txt /package_lists/python_packages.txt RUN apt-get update &&\ - apt-get -y --no-install-recommends install python3-pip && \ + apt-get -y --no-install-recommends install \ + python3-pip \ + python3-dev && \ # Python packages pip3 install -U --no-cache-dir \ $(grep -o '^[^#]*' package_lists/python_packages.txt | tr '\n' ' ') \ diff --git a/package_lists/python_packages.txt b/package_lists/python_packages.txt index 62aa6e1..36a5041 100644 --- a/package_lists/python_packages.txt +++ b/package_lists/python_packages.txt @@ -20,6 +20,7 @@ numpy pandas plotly properscoring +pybind11 pylint pyparsing==2.4.7 pytest From 8baea7fe9ac72d114bae7cf57f22dc01bc0cd09f Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Mon, 13 Nov 2023 16:03:37 +0100 Subject: [PATCH 03/12] Add libboost-all-dev --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6d508e9..b4e35b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele build-essential \ cmake \ ccache \ + libboost-all-dev \ netbase \ zip \ unzip \ From d1ed9eb0a4d1bbc8f5699fcb0d20ca1a268e11ab Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 09:59:35 +0100 Subject: [PATCH 04/12] Add armadillo --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b4e35b7..3885c71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele cmake \ ccache \ libboost-all-dev \ + armadillo \ netbase \ zip \ unzip \ From bbe7dac61e6ad8c685643915956e872589555eaa Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 10:17:33 +0100 Subject: [PATCH 05/12] Fix armadillo package name --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3885c71..d28c1a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele cmake \ ccache \ libboost-all-dev \ - armadillo \ + libarmadillo-dev \ netbase \ zip \ unzip \ From 12bd00b7ac7c1f5dac40ca22d1a651d332c605e7 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 11:17:43 +0100 Subject: [PATCH 06/12] Bump R to 4.3.2, move armadillo into r rundeps --- Dockerfile | 3 +-- install_scripts/install_r.sh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d28c1a5..a8e0b3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,6 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele cmake \ ccache \ libboost-all-dev \ - libarmadillo-dev \ netbase \ zip \ unzip \ @@ -119,7 +118,7 @@ RUN chmod +x install_scripts/install_latex.sh &&\ ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}" # Install R -ENV R_VERSION=4.3.1 +ENV R_VERSION=4.3.2 # Set RSPM snapshot see: # https://packagemanager.posit.co/client/#/repos/cran/setup?r_environment=other&snapshot=2023-10-04&distribution=ubuntu-22.04 diff --git a/install_scripts/install_r.sh b/install_scripts/install_r.sh index ded3cb1..373b7cf 100644 --- a/install_scripts/install_r.sh +++ b/install_scripts/install_r.sh @@ -19,6 +19,7 @@ RUNDEPS="ca-certificates \ pandoc \ libmagick++-dev \ libpoppler-cpp-dev \ + libarmadillo-dev \ libudunits2-dev \ libproj-dev \ libgdal-dev \ From e256a992dae9c32c3549d0e81bcae4fffdd490d3 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 14:48:41 +0100 Subject: [PATCH 07/12] Remove apt-get autoremove --- Dockerfile | 3 +-- install_scripts/install_latex.sh | 1 - install_scripts/install_r.sh | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8e0b3f..3b9a1b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele cmake \ ccache \ libboost-all-dev \ + libarmadillo-dev \ netbase \ zip \ unzip \ @@ -51,7 +52,6 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele update-locale LANG=en_US.UTF-8 &&\ git clone --depth=1 https://github.com/sindresorhus/pure.git /home/$USERNAME/.zsh/pure \ && rm -rf /home/$USERNAME/.zsh/pure/.git \ - && apt-get autoremove -y \ && apt-get autoclean -y \ && rm -rf /var/lib/apt/lists/* @@ -93,7 +93,6 @@ RUN apt-get update &&\ # Python packages pip3 install -U --no-cache-dir \ $(grep -o '^[^#]*' package_lists/python_packages.txt | tr '\n' ' ') \ - && apt-get autoremove -y \ && apt-get autoclean -y \ && rm -rf /var/lib/apt/lists/* diff --git a/install_scripts/install_latex.sh b/install_scripts/install_latex.sh index 1c0f394..94cc798 100644 --- a/install_scripts/install_latex.sh +++ b/install_scripts/install_latex.sh @@ -32,6 +32,5 @@ echo "save_size = 7999999" >> /usr/local/texlive/texmf.cnf rm -r /tmp/* rm -r /root/.cpan/build/* -apt-get autoremove -y apt-get autoclean -y rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/install_scripts/install_r.sh b/install_scripts/install_r.sh index 373b7cf..ded3cb1 100644 --- a/install_scripts/install_r.sh +++ b/install_scripts/install_r.sh @@ -19,7 +19,6 @@ RUNDEPS="ca-certificates \ pandoc \ libmagick++-dev \ libpoppler-cpp-dev \ - libarmadillo-dev \ libudunits2-dev \ libproj-dev \ libgdal-dev \ From 1665d147f279a0ced14cd2898f4b9ffc7ddd0831 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 19:08:14 +0100 Subject: [PATCH 08/12] Add ldconfig --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3b9a1b3..6d7956f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,8 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele git clone --depth=1 https://github.com/sindresorhus/pure.git /home/$USERNAME/.zsh/pure \ && rm -rf /home/$USERNAME/.zsh/pure/.git \ && apt-get autoclean -y \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && ldconfig ENV LC_ALL=en_US.UTF-8 \ LANG=en_US.UTF-8 From c129e28eefff9d839c2261f95d14a6a4f251922d Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 19:47:54 +0100 Subject: [PATCH 09/12] Update ldconfig command --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d7956f..bb8f9a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele && rm -rf /home/$USERNAME/.zsh/pure/.git \ && apt-get autoclean -y \ && rm -rf /var/lib/apt/lists/* \ - && ldconfig + && ldconfig /usr/lib ENV LC_ALL=en_US.UTF-8 \ LANG=en_US.UTF-8 From 8c1d03b91aaff52704e950b1c7f7be26b11b5d9d Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 21:42:55 +0100 Subject: [PATCH 10/12] Remove apt-get remove from install_r script --- Dockerfile | 3 +-- install_scripts/install_r.sh | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb8f9a7..3b9a1b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,8 +53,7 @@ RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula sele git clone --depth=1 https://github.com/sindresorhus/pure.git /home/$USERNAME/.zsh/pure \ && rm -rf /home/$USERNAME/.zsh/pure/.git \ && apt-get autoclean -y \ - && rm -rf /var/lib/apt/lists/* \ - && ldconfig /usr/lib + && rm -rf /var/lib/apt/lists/* ENV LC_ALL=en_US.UTF-8 \ LANG=en_US.UTF-8 diff --git a/install_scripts/install_r.sh b/install_scripts/install_r.sh index ded3cb1..6f09176 100644 --- a/install_scripts/install_r.sh +++ b/install_scripts/install_r.sh @@ -62,8 +62,8 @@ Rscript -e "install.packages('docopt', repos= '$R_REPOS')" pip3 install -U --no-cache-dir radian # R packages on RSPM -install2.r --error --skipinstalled --ncpus 32 \ - $(grep -o '^[^#]*' package_lists/r_packages.txt | tr '\n' ' ') +# install2.r --error --skipinstalled --ncpus 32 \ +# $(grep -o '^[^#]*' package_lists/r_packages.txt | tr '\n' ' ') # R packages on Github installGithub.r \ @@ -75,7 +75,6 @@ R -e "Refinitiv::install_eikon()" chown --recursive $USERNAME:$USERNAME /usr/local/lib/R/site-library rm -r /tmp/* -apt-get remove --purge -y $BUILDDEPS apt-get autoclean -y rm -rf /var/lib/apt/lists/* From 13cfcb669ec0e9df6cf283b930e3e2f34093dd59 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Tue, 14 Nov 2023 21:43:39 +0100 Subject: [PATCH 11/12] Re enable RSPM package install --- install_scripts/install_r.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_scripts/install_r.sh b/install_scripts/install_r.sh index 6f09176..2a70bbe 100644 --- a/install_scripts/install_r.sh +++ b/install_scripts/install_r.sh @@ -62,8 +62,8 @@ Rscript -e "install.packages('docopt', repos= '$R_REPOS')" pip3 install -U --no-cache-dir radian # R packages on RSPM -# install2.r --error --skipinstalled --ncpus 32 \ -# $(grep -o '^[^#]*' package_lists/r_packages.txt | tr '\n' ' ') +install2.r --error --skipinstalled --ncpus 32 \ + $(grep -o '^[^#]*' package_lists/r_packages.txt | tr '\n' ' ') # R packages on Github installGithub.r \ From 19e0020ba541728bacc4c76dc87b70de8e14e8c7 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Thu, 16 Nov 2023 14:49:42 +0100 Subject: [PATCH 12/12] Add carma, change python11 package --- Dockerfile | 13 +++++++++++++ package_lists/python_packages.txt | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3b9a1b3..c1df68a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,16 @@ RUN chmod +x install_scripts/install_phantomjs.sh &&\ # # ENV PATH="/usr/local/vcpkg:${PATH}" +# Install Python CARMA +RUN git clone --depth=1 https://github.com/RUrlus/carma.git /usr/local/carma \ + && rm -rf /usr/local/carma/.git \ + && cd /usr/local/carma \ + && mkdir build \ + && cd build \ + && cmake -DCARMA_INSTALL_LIB=ON .. \ + && cmake --build . --config Release --target install \ + && chown --recursive $USERNAME:$USERNAME /usr/local/carma + # Install Python COPY package_lists/python_packages.txt /package_lists/python_packages.txt @@ -140,6 +150,9 @@ COPY --chown=$USERNAME .misc/Makevars /home/$USERNAME/.R/. RUN mkdir /home/$USERNAME/.ccache && chown -R $USERNAME /home/$USERNAME/.ccache COPY --chown=$USERNAME .misc/ccache.conf /home/$USERNAME/.ccache/. +RUN chown -R $USERNAME /usr/local/lib +RUN chown -R $USERNAME /usr/local/include + # Switch to non-root user USER $USERNAME diff --git a/package_lists/python_packages.txt b/package_lists/python_packages.txt index 36a5041..f03dacf 100644 --- a/package_lists/python_packages.txt +++ b/package_lists/python_packages.txt @@ -20,7 +20,7 @@ numpy pandas plotly properscoring -pybind11 +pybind11[global] pylint pyparsing==2.4.7 pytest