Open j-wags opened 4 years ago
Is this something Todd would want to take on/get working?
@Lnaden has extensive experience with crafting Docker containers that minimize the size of the resulting image, and can likely provide useful input.
One thing he suggested early on is to not craft a Dockerfile
with multiple RUN
statements, since each one creates a new layer that must be downloaded, adding to size and slowing down docker image retrieval. Instead, we want to coalesce as many commands as we can into a single call so that only the diff to the final state is stored in the image layer.
It should be very easy to put this together, but some questions:
win
conda packages directly?I suspect the instructions above are actually sufficient to get things running (just replacing openmm
with openforcefield
). Some other important considerations are:
* Do we tell people how to install docker?
Yes, specifically version 19 or newer, that's where convenient support for GPUs was added. OpenMM can leverage GPU and works inside the nvidia base container, it adds 200MB to the download size to have it for the OpenCL version, and 900MB for the CUDA version (plus CUDA needs a license disclaimer on it)
Getting files in and out is a little bit complicated, so we should probably add instructions for that I'll write the documentation for that
Do we expect this to have good performance relative to not-containerized runs? If we expect a 75% performance loss, we may want to rethink if we really want to encourage people to spend GPU time on this Containers tend to run near-native performance on Linux since they utilize the host OS kernel. I don't know about Windows
- Where to distribute these assets
Could put whole images in the GH Release Assets section
Could host on DockerHub or other docker repo
Could just paste the above dockerfile, maybe with pinned OFFTK version depending on whether the instructions are attached to a release It is often a good idea to post both the container to DockerHub, and the Dockerfile there as well, AND to have the Dockerfile contained in your git repo next to the code.
Also, this sample Dockerfile is a bit of a hack, but this does build just fine
FROM nvidia/opencl:devel-centos7
RUN yum update -y && \
yum install -y epel-release && \
yum update -y && \
yum install -y conda && \
conda create -y -n root && \
conda install -y -c omnia -c conda-forge openforcefield
Thanks to @tyggna for the idea and explanation
Currently, Windows users don't have any way to use the Open Force Field Toolkit. Docker could provide a way for them and people in other circumstances to use the toolkit.
Todd Millecam 16:44
RUN yum update -y RUN yum install -y epel-release wget cmake RUN yum update -y RUN yum install -y conda sudo RUN conda create -y -n root RUN conda install -y -c omnia -c conda-forge openmm