-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
squashme: use micromamba to install conda
- Loading branch information
Showing
2 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
ARG BASE_IMAGE=renku/renkulab-vscode:latest | ||
FROM $BASE_IMAGE | ||
ARG MINIFORGE_VERSION=24.9.2-0 | ||
ARG OS=Linux | ||
ARG ARCH=x86_64 | ||
ARG MICROMAMBA_VERSION=2.0.2-2 | ||
ARG MAMBA_VERSION=1.5.9 | ||
ARG CONDA_VERSION=24.9.2 | ||
ARG PYTHON_VERSION=3.12.7 | ||
ARG OS=linux | ||
ARG ARCH=64 | ||
ARG SESSION_USER=vscode | ||
ARG WORKDIR=/home/${SESSION_USER}/work | ||
ARG VENVS_PATH=${WORKDIR}/.venvs | ||
ENV VENVS_PATH=${VENVS_PATH} | ||
ENV __VENVS_PATH__=${VENVS_PATH} | ||
ENV __PYTHON_VERSION__=${PYTHON_VERSION} | ||
ENV __MAMBA_VERSION__=${MAMBA_VERSION} | ||
ENV __CONDA_VERSION__=${CONDA_VERSION} | ||
SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] | ||
USER root | ||
RUN apt-get update && \ | ||
apt-get install -y curl --no-install-recommends && \ | ||
curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o /install.sh && \ | ||
curl -L "https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${OS}-${ARCH}" -o /usr/local/bin/micromamba && \ | ||
chmod a+x /usr/local/bin/micromamba && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
USER ${SESSION_USER} | ||
WORKDIR ${WORKDIR} | ||
ENTRYPOINT ["tini", "--", "sh", "-c"] | ||
CMD ["bash /install.sh -b -u -p ${VENVS_PATH} && ${VENVS_PATH}/bin/conda init && bash /entrypoint.sh"] | ||
CMD ["set -ex && micromamba install --yes --root-prefix=${__VENVS_PATH__} --prefix=${__VENVS_PATH__} python=${__PYTHON_VERSION__} mamba=${__MAMBA_VERSION__} conda=${__CONDA_VERSION__} && ${__VENVS_PATH__}/bin/mamba init && ${__VENVS_PATH__}/bin/conda config --add channels conda-forge && ${__VENVS_PATH__}/bin/conda config --set channel_priority strict && bash /entrypoint.sh"] |