From 4034d7d045eacb7e9343271ca59847cd1e8fc01b Mon Sep 17 00:00:00 2001 From: Elsa Culler Date: Wed, 10 Jan 2024 11:35:08 -0700 Subject: [PATCH] fix users for libfmt install --- Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff2ff13..aa9444b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,28 @@ FROM jupyter/minimal-notebook:python-3.10 -USER jovyan - +# Installing package for libmamba +USER root RUN apt-get update && \ apt install -y \ libfmt-dev +USER jovyan +# Set up conda RUN conda update conda RUN conda config --remove channels conda-forge RUN conda config --add channels conda-forge RUN conda config --set channel_priority strict +# Create environment COPY environment.yml /home/jovyan/ RUN conda env update -n base -f /home/jovyan/environment.yml -# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers + +# Activating environment RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/jovyan/.bash_profile && \ echo "conda deactivate" >> /home/jovyan/.bash_profile && \ echo "conda activate base" >> /home/jovyan/.bash_profile -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base +RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && python -m ipykernel install --user --name base +# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers RUN source /home/jovyan/.bash_profile # Install dev version of Earthpy