@@ -10,7 +10,8 @@ ARG HOME_DIR="/home/${MNE_USER}"
1010ENV MNE_USER=${MNE_USER}
1111ENV HOME_DIR=${HOME_DIR}
1212
13- ARG CONDA_DIR="/opt/conda/"
13+ ARG MAMBA_ROOT_PREFIX="/opt/conda"
14+ ENV MAMBA_ROOT_PREFIX=${MAMBA_ROOT_PREFIX}
1415
1516# install xvfb
1617RUN apt-get update && \
@@ -30,20 +31,25 @@ RUN useradd -ms /bin/bash -d ${HOME_DIR} ${MNE_USER}
3031USER $MNE_USER
3132WORKDIR $HOME_DIR
3233
33- # setup conda
34- ENV PATH="${CONDA_DIR}/bin:${PATH}"
35- ARG PATH="${CONDA_DIR}/bin:${PATH}"
36- RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
37- sh ./Miniconda3-latest-Linux-x86_64.sh -b -p ${CONDA_DIR} && \
38- rm -f ./Miniconda3-latest-Linux-x86_64.sh && \
39- conda init
34+ # setup conda via micromamba
35+ # https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#automatic-install
36+ ENV PATH="${MAMBA_ROOT_PREFIX}/bin:${PATH}"
37+ ARG PATH="${MAMBA_ROOT_PREFIX}/bin:${PATH}"
38+ ENV SHELL="/bin/bash"
39+ RUN wget https://micro.mamba.pm/install.sh && \
40+ sh ./install.sh && \
41+ rm -f ./install.sh
4042SHELL ["/bin/bash" , "--login" , "-c" ]
41- RUN conda config --add channels conda-forge && \
42- conda config --remove channels defaults && \
43- conda config --set channel_priority strict && \
44- conda config --get channels
45- RUN conda install --yes \
46- python==3.12 \
43+ RUN micromamba shell init -s bash -r ${MAMBA_ROOT_PREFIX}
44+ RUN echo "micromamba activate" | tee -a ~/.bashrc
45+ RUN cat ~/.bashrc
46+ RUN echo "PATH=$PATH"
47+ RUN which micromamba && \
48+ micromamba config append channels conda-forge && \
49+ micromamba config set channel_priority strict && \
50+ micromamba config list --sources
51+ RUN micromamba install -y \
52+ python=3.13 \
4753 python-blosc \
4854 cytoolz \
4955 dask \
@@ -64,17 +70,25 @@ RUN conda install --yes \
6470 nilearn \
6571 dipy \
6672 h5io \
73+ conda \
6774 mamba \
6875 conda-libmamba-solver \
6976 mne-bids-pipeline \
7077 statsmodels \
71- fooof \
72- && conda clean -tipy \
73- && find /opt/conda/ -type f,l -name '*.a' -delete \
74- && find /opt/conda/ -type f,l -name '*.pyc' -delete \
75- && find /opt/conda/ -type f,l -name '*.js.map' -delete \
76- && find /opt/conda/lib/python*/site-packages/bokeh/server/static -type f,l -name '*.js' -not -name '*.min.js' -delete \
77- && rm -rf /opt/conda/pkgs
78+ fooof
79+
80+ RUN which conda && \
81+ conda --version && \
82+ which mamba && \
83+ mamba --version
84+
85+ RUN conda clean -tipy
86+ RUN find /opt/conda/ -type f,l -name '*.a' -delete
87+ RUN find /opt/conda/ -type f,l -name '*.pyc' -delete
88+ RUN find /opt/conda/ -type f,l -name '*.js.map' -delete
89+ RUN rm -rf /opt/conda/pkgs
90+
91+ RUN conda list
7892
7993RUN pip install https://github.com/mne-tools/mne-python/archive/${mne_v}.zip
8094
0 commit comments