Skip to content

Docker conda builds #299

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

Merged
merged 3 commits into from
Nov 12, 2023
Merged
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
52 changes: 21 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,29 @@ WORKDIR "${HOME}"
# remove the "work/" directory added in an earlier layer...
RUN rm -rf work


RUN pip install docutils==0.17.1 # Need to pin docutils to an old version for now, due to https://github.com/executablebooks/jupyter-book/issues/2022
RUN pip install referencing
RUN pip install jupyter-book
# Pinning pandas until altair 5.1.2 to avoid future warning https://github.com/altair-viz/altair/issues/3181
RUN pip install numpy jinja2 pandas altair">=5.1.2" "vegafusion[embed]" vl-convert-python">=0.14" click ibis-framework ghp-import jupytext nodejs lxml

# forces scikit-learn to grab latest to avoid bug in 1.3.0 related to checking for c-contiguity breaking figures in classification 2. See https://github.com/scikit-learn/scikit-learn/pull/26772
# TODO: remove this once scikit-learn 1.4.x or beyond releases and is incorporated into jupyter/scipy-notebook
RUN pip install -U git+https://github.com/scikit-learn/scikit-learn.git@main

# install plotly for 3d figures
RUN pip install plotly

# disable warnings that pollute build logs; seems to be related to the update to python 3.11
# https://discourse.jupyter.org/t/debugger-warning-it-seems-that-frozen-modules-are-being-used-python-3-11-0/16544/12
ENV PYDEVD_DISABLE_FILE_VALIDATION=1

## Install various python packages
# commented out for now due to various package version conflicts
# installing via pip instead above
#RUN mamba install --quiet --yes \
# 'numpy' \
# 'jinja2' \
# 'altair_data_server' \
# 'altair_saver' \
# 'click' \
# 'ibis-framework' \
# 'ghp-import' \
# 'jupytext' \
# 'jupyter-book' \
# 'nodejs' \
# && mamba clean --all -f -y \
# && fix-permissions "${CONDA_DIR}" \
# && fix-permissions "/home/${NB_USER}"

RUN mamba install --quiet --yes \
'numpy' \
'pandas>=2.1.3' \
'jinja2' \
'altair>=5.1.2' \
'vl-convert-python>=0.14' \
'vegafusion[embed]' \
'click' \
'ibis-framework' \
'ghp-import' \
'jupytext' \
'jupyter-book' \
'scikit-learn>=1.3.2' \
'nodejs' \
'plotly' \
'lxml' \
'referencing' \
'docutils==0.17.1' \
&& mamba clean --all -f -y \
&& fix-permissions "${CONDA_DIR}" \
&& fix-permissions "/home/${NB_USER}"
2 changes: 1 addition & 1 deletion build_html.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
chmod -R o+w source/
docker run --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20231110054348fd23c8 /bin/bash -c "jupyter-book build source"
docker run --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20231112004031dd2207 /bin/bash -c "jupyter-book build source"
2 changes: 1 addition & 1 deletion build_pdf.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
chmod -R o+w source/
docker run --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20231110054348fd23c8 /bin/bash -c "export BOOK_BUILD_TYPE='PDF'; jupyter-book build source --builder pdflatex"
docker run --rm -v $(pwd):/home/jovyan ubcdsci/py-intro-to-ds:20231112004031dd2207 /bin/bash -c "export BOOK_BUILD_TYPE='PDF'; jupyter-book build source --builder pdflatex"