Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade binder submodule, use fully pinned environment definition #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ FROM jupyter/base-notebook

USER root
RUN apt-get update \
&& apt-get install -yq --no-install-recommends dnsutils libfuse-dev nano fuse vim git build-essential openssh-client \
&& apt-get install -yq --no-install-recommends dnsutils libfuse-dev nano fuse vim git build-essential openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

USER $NB_USER
RUN conda config --set ssl_verify no
COPY binder/environment.yml /tmp/environment.yml
COPY binder/environment-pinned-linux.yml /tmp/environment.yml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change, using the fully pinned environment file.


ARG tag
RUN echo "image tag is $tag"
Expand All @@ -17,29 +17,22 @@ ENV IMAGETAG=$tag
RUN echo " ---------------------------------- "
RUN echo "env variable IMAGETAG is ${IMAGETAG}"

# create default scientific Python environment



# create default scientific Python environment

RUN conda config --add channels pyviz/label/dev
RUN conda config --add channels bokeh/label/dev
RUN conda config --add channels intake
RUN conda config --add channels bioconda
RUN conda config --add channels conda-forge
#RUN conda update --yes conda
RUN conda config --set channel_priority strict
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also an important change, ensures packages are pulled from conda-forge instead of defaults wherever possible, which results in a more consistent environment.

RUN conda update --yes conda
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this had been commented out, but there have been some improvements in recent conda versions, so thought maybe best to run it?


RUN conda env update --file /tmp/environment.yml --prune
RUN conda env update --file /tmp/environment.yml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are installing this into the base environment, is that right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e., I think the environment name from within the environment file will be ignored.

RUN conda clean -afy
# && find /opt/conda/ -follow -type f -name '*.a' -delete \
# && find /opt/conda/ -follow -type f -name '*.pyc' -delete \
# && find /opt/conda/ -follow -type f -name '*.js.map' -delete
#


RUN /opt/conda/bin/pip install nbserverproxy
RUN conda install nb_conda

RUN conda install nb_conda

RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN jupyter labextension install @jupyterlab/hub-extension
Expand All @@ -49,9 +42,6 @@ RUN jupyter labextension install dask-labextension

RUN jupyter serverextension enable --py nbserverproxy --sys-prefix




USER root
COPY prepare.sh /usr/bin/prepare.sh
RUN chmod +x /usr/bin/prepare.sh
Expand All @@ -76,4 +66,3 @@ ENV PATH /opt/conda/envs/$(head -1 /tmp/environment.yml | cut -d' ' -f2)/bin:$PA

ENTRYPOINT ["tini", "--", "/usr/bin/prepare.sh"]
CMD ["start.sh jupyter lab"]

2 changes: 1 addition & 1 deletion binder