RussTedrake / manipulation

Course notes for MIT manipulation class
BSD 3-Clause "New" or "Revised" License
424 stars 124 forks source link

install nginx in deepnote docker file #191

Open RussTedrake opened 2 years ago

RussTedrake commented 2 years ago

so that it doesn't need to get installed on the first call to StartMeshcat.

RussTedrake commented 2 years ago

done. I now call RUN /opt/drake/share/drake/setup/deepnote/install_nginx in the Dockerfile, but of course the service is not started each time the dockerfile is provisioned on Deepnote. The result is that the first call to StartMeshcat still says "installing nginx", but it at least returns very fast.

I tried adding RUN systemctl enable nginx to the dockerfile, but learned the docker does use sysctl / system.d. Adding CMD service nginx start didn't seem to get the job done, either.

cc @jwnimmer-tri, in case you have any better ideas. But I'm at least happy that it's faster.

jwnimmer-tri commented 2 years ago

This all sounds fine.

FYI what we do for Drake tutorials is shown here:

https://drake.mit.edu/release_playbook.html#post-release-tutorials-updates

The only slow part is the apt, which we bake into the Docker image like so:

RUN apt-get -q update && apt-get -q install -y --no-install-recommends nginx-light xvfb && apt-get -q clean

We use an init.ipynb to do the install_xvfb. I realize now that it could probably do the install_nginx as well, which would maybe remove the printout from the actual notebooks for you?

RussTedrake commented 2 years ago

Thanks. I thought about init.ipynb for this. I'll go ahead with that.