Packaging CADET with docker and conda-forge

Hi @j.schmoelder. I have experienced a problem trying to install cadet inside docker. So the problem is that the architecture of the publically available cadet-coredocker image is not compatible with the architecture of the docker. Or am I missing something? if yes, could you please mention the steps so that i can cross check if everything i did was right? Also how to install cadet python in the docker?

Hi and welcome to the Forum!

I don’t believe we have an official CADET Docker image (yet). Where did you get this from, if I may ask?

@ronald.jaepel is this maybe related to your recent activities?

I had made a dockerfile a while back to build a CADET-Process image and run a container locally for my own testing, I’ve copied it here for reference if it is helpful. If you want CADET-Python specifically you can change the pip install command accordingly.

You’ll also need the env.yaml in this case as well (also included below).

# Base image with Python 3.12
FROM python:3.12.7-slim

# Set working directory
WORKDIR /app

# Update and install essential tools
RUN apt-get update && apt-get install -y \
    wget \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Download and install Miniforge
RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O /tmp/miniforge.sh && \
    bash /tmp/miniforge.sh -b -p /opt/conda && \
    rm /tmp/miniforge.sh

# Add a cadet directory
RUN mkdir -p /opt/cadet

# Add Conda to PATH
ENV PATH="/opt/conda/bin:$PATH"

# Install mamba for faster package installation
RUN conda install mamba -n base -c conda-forge

# Copy environment.yaml to the container
COPY env.yaml /tmp/env.yaml

# Create the conda environment from the yaml file
RUN conda env create -f /tmp/env.yaml && \
    conda clean -a && \
    rm /tmp/env.yaml

# Install cadetmatch via pip
RUN pip install cadet-process

# Expose the working directory to interact with the CLI
VOLUME ["/app"]

# Default command: Open a shell for manual testing
CMD ["/bin/bash"]
name: cadetmatch
channels:
  - conda-forge
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/msys2
dependencies:
  - cadet
  - pip