From 8e0abd95cb132c52e4c1c40b5938d33b070e0390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Voituret?= Date: Thu, 18 Jun 2020 14:42:04 +0200 Subject: [PATCH] refactor: conda base --- docker/conda.dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker/conda.dockerfile b/docker/conda.dockerfile index 349cbae..f0e2f53 100644 --- a/docker/conda.dockerfile +++ b/docker/conda.dockerfile @@ -1,6 +1,24 @@ ARG BASE=python:3.7 + +FROM ${BASE} AS conda-installer + +ARG CONDA_VERSION=3 +ARG MINICONDA_VERSION=4.5.11 + +RUN apt-get update \ + && apt-get -y install wget \ + && wget --quiet \ + -O miniconda.sh \ + https://repo.anaconda.com/miniconda/Miniconda${CONDA_VERSION}-${MINICONDA_VERSION}-Linux-x86_64.sh \ + && bash miniconda.sh -b -p /opt/conda + FROM ${BASE} +ENV PATH /opt/conda/bin:${PATH} +COPY --from=conda-installer /opt/conda/ /opt/conda/ +RUN ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh \ + && echo ". /opt/conda/etc/profile.d/conda.sh" >> "${HOME}/.bashrc" \ + && echo "conda activate base" >> "${HOME}/.bashrc" RUN apt-get update --fix-missing \ && apt-get install -y wget bzip2 ca-certificates curl git \ && apt-get clean \