From 4e067d3e95d89b1b980dea4f31f75e026f5162f4 Mon Sep 17 00:00:00 2001 From: Stefano Carrazza Date: Sat, 28 Aug 2021 23:08:09 +0200 Subject: [PATCH] updating dockerfile --- docker/dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/dockerfile b/docker/dockerfile index e5e4ea86f..0d54bc361 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -11,6 +11,10 @@ ENV CONDA_FILE Miniconda3-latest-Linux-x86_64.sh # Disable Prompt During Packages Installation ARG DEBIAN_FRONTEND=noninteractive +# Get conda environemnt name +ARG CONDA_ENV_NAME +ENV CONDA_ENV_NAME=$CONDA_ENV_NAME + # Update Ubuntu Software repository RUN apt update @@ -35,8 +39,9 @@ RUN conda config --append channels conda-forge COPY conda-bld /root/conda-bld # install the nnpdf framework -RUN conda create -n nnpdfenv -c file:///root/conda-bld/linux-64 nnpdf && \ - echo "conda activate nnpdfenv" >> /root/.bashrc +RUN conda create -n $CONDA_ENV_NAME -c file:///root/conda-bld/linux-64 nnpdf && \ + echo "conda activate $CONDA_ENV_NAME" >> /root/.bashrc && \ + conda env export --name $CONDA_ENV_NAME > /root/$CONDA_ENV_NAME.yml # delete package RUN rm -r /root/conda-bld