Skip to content

Commit

Permalink
Add python and pip to Dockerfile to support running 20.04 notebooks o…
Browse files Browse the repository at this point in the history
…n deepnote.com

The current images will not run on deepnote.  Adding these lines fulfills the requirements, as specified here:
https://docs.deepnote.com/environment/custom-environments#custom-image-requirements

To reproduce, I have uploaded the revised image to DockerHub as robotlocomotion/drake:pr15586-focal.  Visit https://deepnote.com/project/Drake-PR-15586-mPXpOqUZTqe8JBtfj5z4xQ/%2Fnotebook.ipynb .  You will need to create an account to proceed, I'm afraid.  Then
- On the left menu, click on the Environment toolbar, and then look at the "Environment" dropdown.
- I've connected 3 docker images: robotlocomotion/drake:bionic and robotlocomotion/drake:focal and robotlocomotion/drake:pr15586-focal
- Confirm that selecting the two existing images will spend some time "Loading image..." but then will fail with

`We failed to run the image you specified. Your image doesn’t exist, or we don’t have permissions to access it, or it doesn't fulfill the requirements to run.`

- Confirm that selecting the revised image will load successfully.
- For the revised image, run the first cell of the notebook, and see that pydrake loads successfully and prints the expected file path.
  • Loading branch information
RussTedrake committed Aug 10, 2021
1 parent ef8f847 commit b81329f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/install/dockerhub/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq \
&& apt-get install --no-install-recommends -o Dpkg::Use-Pty=0 -qy \
$(cat /opt/drake/share/drake/setup/packages-focal.txt) \
# Make python and pip available to meet the requirements for deepnote.com:
# https://docs.deepnote.com/environment/custom-environments#custom-image-requirements
python3-pip python-is-python3 \
&& rm -rf /opt/drake/share/drake/setup /var/lib/apt/lists/* \
&& mv /opt/drake/bin/drake-visualizer /opt/drake/bin/drake-visualizer.image
RUN printf '#!/bin/bash\n \
Expand Down

0 comments on commit b81329f

Please sign in to comment.