QCDIS / NaaVRE-flavors

Flavors of NaaVRE
Apache License 2.0
0 stars 0 forks source link

Add trias to biotope flavor #27

Closed gpelouze closed 2 months ago

gpelouze commented 6 months ago

Trias should be installed with:

RUN R -e devtools::install_github('trias-project/trias@5d0f27f76567c0d11021a3055c32ec521622ca36')

In PR #26, it was added in the jupyter image, but not in the cell images:

trias is not included in the cell base at the moment. (It can neither be installed in the build image because it disrupts conda-pack, nor in the runtime image because the it doesn’t have the conda env.)

gpelouze commented 6 months ago

Checkout https://github.com/conda/conda/issues/6674

gpelouze commented 6 months ago

With continuumio/miniconda3:4.12.0:

$ conda install conda-build git
$ conda skeleton cran https://github.com/trias-project/trias --git-tag v2.0.7
$ conda build --R=4.3 r-trias
$ conda install /opt/conda/conda-bld/linux-64/r-trias-2.0.7-r43_0.tar.bz2
$ conda list | grep trias
r-trias                   2.0.7                     r43_0    <unknown>

Remaining issues:

gpelouze commented 6 months ago

We can add flavors/biotope/naavre-cell-build.Dockerfile:

FROM continuumio/miniconda3:4.12.0 as build-trias

RUN \
  conda install conda-build git && \
  conda skeleton cran https://github.com/trias-project/trias --git-tag v2.0.7 && \
  conda build --R=4.3 r-trias

FROM mambaorg/micromamba:1.5.6
RUN micromamba install -y -n base -c conda-forge conda-pack
ARG CONDA_ENV_FILE
COPY ${CONDA_ENV_FILE} environment.yaml
RUN micromamba create -y -n venv -f environment.yaml && \
    micromamba clean --all --yes

COPY --from=build-trias /opt/conda/conda-bld/linux-64/r-trias-2.0.7-r43_0.tar.bz2 .
RUN conda install r-trias-2.0.7-r43_0.tar.bz2

However, the last step needs to be translated from conda to micromamba, which does not support installing from .tar.bz2 (https://github.com/mamba-org/mamba/issues/2291). Let's wait for micromamba v2 which will add support for it.