Skip to content

Commit

Permalink
dockerfile requirements file munging (#469)
Browse files Browse the repository at this point in the history
* dockerfile requirements file munging

* brief explanation of the changes

* hmm, testing changing workdir to '/'

* pin ipyannotations == 0.2.1
  • Loading branch information
amygdala authored Sep 28, 2021
1 parent 8ab06a9 commit 0a5b4ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions docker/terra_image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FROM us.gcr.io/broad-dsp-gcr-public/terra-jupyter-gatk:2.0.1
FROM us.gcr.io/broad-dsp-gcr-public/terra-jupyter-gatk:2.0.2
# https://github.com/DataBiosphere/terra-docker/blob/master/terra-jupyter-gatk/CHANGELOG.md

USER root
ENV PIP_USER=false

RUN pip3 install -U git+https://github.com/broadinstitute/ml4h.git
WORKDIR /

# Now that the Terra image is built from a TensorFlow base image, if TF is included in the
# ML4h requirements.txt, this causes problems with the Terra 'cloud environment' launch.
# In addition, other tensorflow-related libraries need to be unpinned so that they remain consistent
# with the TF version used by the Terra base image.
RUN wget --no-check-certificate https://raw.githubusercontent.com/broadinstitute/ml4h/master/docker/vm_boot_images/config/tensorflow-requirements.txt -O /tensorflow-requirements.txt
RUN grep -v 'tensorflow==' /tensorflow-requirements.txt \
| sed -E 's/(tensorflow-addons)(==.*)$/\1/g' \
| sed -E 's/(tensorflow_probability)(==.*)$/\1/g' > /terra-tensorflow-requirements.txt \
&& pip3 install --upgrade --requirement /terra-tensorflow-requirements.txt \
&& pip3 install --upgrade --no-deps git+https://github.com/broadinstitute/ml4h.git

# Remove the following two installs after https://github.com/DataBiosphere/terra-docker/issues/244 is addressed.
RUN pip3 install -U tensorflow==2.4.3
RUN pip3 install tensorflow-probability==0.12.2

# Remove this after https://broadworkbench.atlassian.net/browse/CA-1240
# As of release [google-cloud-bigquery 1.26.0 (2020-07-20)](https://github.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#1260-2020-07-20)
Expand All @@ -20,10 +28,9 @@ RUN pip3 uninstall -y google-cloud-bigquery-storage

ENV USER jupyter
USER $USER
ENV PIP_USER=true

RUN jupyter nbextension install --user --py vega \
&& jupyter nbextension enable --user --py vega \
&& jupyter nbextension install --user --py ipycanvas \
&& jupyter nbextension enable --user --py ipycanvas

ENV PIP_USER=true
2 changes: 1 addition & 1 deletion docker/vm_boot_images/config/tensorflow-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ facets-overview
plotnine
vega
ipycanvas>=0.7.0
ipyannotations>=0.2.1
ipyannotations==0.2.1
torch
opencv-python
blosc
Expand Down

0 comments on commit 0a5b4ea

Please sign in to comment.