From eab98acffbb8ea63433eafb481a47fa84a87756d Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Thu, 18 Jan 2024 13:55:45 -0500 Subject: [PATCH] fix(ci): fix `quarto` render without quartodoc and better speed --- compose/docs/Dockerfile | 27 +++++++++++++++++++++------ environment.yml | 2 +- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/compose/docs/Dockerfile b/compose/docs/Dockerfile index a840dddc..656d736c 100644 --- a/compose/docs/Dockerfile +++ b/compose/docs/Dockerfile @@ -1,9 +1,10 @@ ARG QUARTO_VERSION="1.3.450" -FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder +# FROM ghcr.io/quarto-dev/quarto:${QUARTO_VERSION} AS builder +FROM registry.gitlab.com/quarto-forge/docker/polyglot as builder ARG PORT=8080 -ARG py_ver=3.9 +ARG py_ver=3.10 ENV DEBIAN_FRONTEND=noninteractive # ARG RIG_VERSION="latest" @@ -22,11 +23,25 @@ WORKDIR /app EXPOSE ${PORT}:${PORT} # RUN quarto preview --port ${PORT}:${PORT} -RUN apt-get update && apt-get install -y python${py_ver} python3-pip r-base r-base-dev -RUN pip3 install quartodoc && quartodoc build -RUN Rscript -e 'install.packages("rmarkdown", repos="https://cloud.r-project.org")' +# RUN apt-get update && apt-get install -y python${py_ver} python3-pip r-base r-base-dev +# RUN micromamba install -y -n base quartodoc && quartodoc build -RUN quarto render +RUN micromamba config append channels conda-forge && \ + micromamba install -y -n base quartodoc + + +USER root + +# RUN micromamba run -n base quartodoc build && \ +# micromamba run -n base quarto render + +RUN micromamba run -n base quarto render + +# RUN quartodoc build + +# RUN Rscript -e 'install.packages("rmarkdown", repos="https://cloud.r-project.org")' + +# RUN micromamba run -n base quarto render FROM httpd:alpine COPY --from=builder /app/_site/ /usr/local/apache2/htdocs/ diff --git a/environment.yml b/environment.yml index a44857e3..312016d5 100644 --- a/environment.yml +++ b/environment.yml @@ -50,7 +50,7 @@ dependencies: - pytest-cov==4.1.0 - pytest-sugar==0.9.7 - pytz==2022.5 - - quartodoc==0.6.3 + - quartodoc==0.7.2 - rasterio==1.3.3 - rioxarray==0.12.3 - scipy==1.10.0