forked from neuromatch/climate-course-content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
20 lines (17 loc) · 941 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# FROM pangeo/pangeo-notebook:latest
FROM pangeo/pangeo-notebook:2023.07.02
COPY environment.yml /tmp/environment.yml
# RUN conda config --set channel_priority flexible
# RUN conda config --set solver classic
RUN mamba env update -f /tmp/environment.yml -n notebook
USER root
RUN apt update
# Install SDFC
# To compile we need gcc so need to update apt and install (conda gcc does not work)
# Also SDFC uses legacy setup.py and not pip so have to clone and run python setup.py install and point to the eigen install
# USER root
# WORKDIR /tmp
# RUN apt update && apt install gcc g++ --yes && wget https://github.com/yrobink/SDFC-python/archive/refs/heads/main.tar.gz && tar -xzf main.tar.gz && rm -rf main.tar.gz && cd SDFC-python-main && PATH=/usr/bin:$PATH /srv/conda/envs/notebook/bin/python setup.py install eigen="/srv/conda/envs/notebook/include/eigen3"
# Switch back to home and jovyan (defaults)
WORKDIR /home/jovyan
USER jovyan