Closed gpelouze closed 2 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:
conda skeleton cran <github url>
seems broken with conda >= 22.11.1:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/conda/exception_handler.py", line 17, in __call__
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/conda/cli/main.py", line 64, in main_subshell
exit_code = do_call(args, parser)
File "/opt/conda/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 143, in do_call
result = plugin_subcommand.action(getattr(args, "_args", args))
File "/opt/conda/lib/python3.10/site-packages/conda_build/plugin.py", line 59, in skeleton
return execute(args)
File "/opt/conda/lib/python3.10/site-packages/conda_build/cli/main_skeleton.py", line 65, in execute
api.skeletonize(
File "/opt/conda/lib/python3.10/site-packages/conda_build/api.py", line 360, in skeletonize
module.skeletonize(
File "/opt/conda/lib/python3.10/site-packages/conda_build/skeletons/cran.py", line 996, in skeletonize
source.git_source(
File "/opt/conda/lib/python3.10/site-packages/conda_build/source.py", line 429, in git_source
git_depth = int(source_dict.get("git_depth", -1))
AttributeError: 'list' object has no attribute 'get'
conda packages can only be built from git tags, but the initial container was using https://github.com/trias-project/trias/commit/5d0f27f76567c0d11021a3055c32ec521622ca36 which predates current tags.
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.
Trias should be installed with:
In PR #26, it was added in the jupyter image, but not in the cell images: