manipulation icon indicating copy to clipboard operation
manipulation copied to clipboard

install nginx in deepnote docker file

Open RussTedrake opened this issue 2 years ago • 3 comments

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

RussTedrake avatar Sep 09 '22 00:09 RussTedrake

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.

RussTedrake avatar Sep 09 '22 10:09 RussTedrake

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?

jwnimmer-tri avatar Sep 13 '22 17:09 jwnimmer-tri

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

RussTedrake avatar Sep 14 '22 01:09 RussTedrake