forked from IDAES/idaes-pse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (46 loc) · 2 KB
/
Dockerfile
File metadata and controls
54 lines (46 loc) · 2 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This Dockerfile is adapted (with modifications) from this Dockerfile:
# https://github.com/jupyter/docker-stacks/blob/master/scipy-notebook/Dockerfile
ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER
MAINTAINER Project IDAES <[email protected]>
USER $NB_UID
# Install Python 3 packages
RUN conda install --quiet --yes \
'ipywidgets=7.2*' \
'xlrd' && \
# Activate ipywidgets extension in the environment that runs the notebook server
jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
# Also activate ipywidgets extension for JupyterLab
# Check this URL for most recent compatibilities
# https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager
jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
# Pin to 0.6.2 until we can move to Lab 0.35 (jupyterlab_bokeh didn't bump to 0.7.0)
jupyter labextension install jupyterlab_bokeh && \
npm cache clean --force && \
rm -rf $CONDA_DIR/share/jupyter/lab/staging && \
rm -rf /home/$NB_USER/.cache/yarn && \
rm -rf /home/$NB_USER/.node-gyp && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# Maintainer Note: We're using bokeh for plotting (not matplotlib). Uncomment if matplotlib needed.
# Import matplotlib the first time to build the font cache.
# ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
# RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
# fix-permissions /home/$NB_USER
# Add idaes directory and change permissions to the notebook user:
ADD . /home/idaes
USER root
RUN sudo apt-get update
RUN sudo apt-get -y install libgfortran3
RUN echo "America/Los_Angeles" > /etc/timezone
RUN chown -R $NB_UID /home/idaes
# Install idaes requirements.txt
USER $NB_UID
WORKDIR /home/idaes
RUN pip install -r requirements-dev.txt
RUN python setup.py install
RUN idaes get-extensions
WORKDIR /home
ENV PATH=$PATH:/home/jovyan/.idaes/bin
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jovyan/.idaes/lib:/opt/conda/lib/
USER $NB_UID