-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Dockerfile
33 lines (27 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM jupyter/minimal-notebook:python-3.11
# Installing package for libmamba
USER root
RUN apt-get update && \
apt-get install -y \
libfmt-dev \
libtiff5
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
#RUN conda config --set solver classic
# Create environment
COPY environment.yml /home/jovyan/
RUN conda install -n base -c conda-forge mamba
RUN mamba env update -n base -f /home/jovyan/environment.yml
# 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
# using ~/.bash_profile instead of ~/.bashrc for non-interactive tty (-it) containers
RUN source /home/jovyan/.bash_profile
# Install dev version of Earthpy
RUN pip install git+https://github.com/earthlab/earthpy@apppears