yank
yank copied to clipboard
Updated docker image for YANK
Hello,
I am wondering if there is an updated docker/singularity image for YANK. I tried to use the old one: https://hub.docker.com/r/choderalab/yank
and tried building my own but in vain. There are a lot of incompatibilities between recent libraries and GPU platforms.
Thanks, M
We are working on improving our maintenance of this package. It is tricky to get a docker or singularity image built that works since (typically) the cuda version on the image needs to match what is on the host. What cuda version are you trying to target? I can try and build an image for you (and update our official images).
Thanks so much Mark, I was looking for cuda11.3 build. If you can make it work, that would be great. I am a strong advocate for YANK, this package is one of the best out there. With just some updates, updated documentation, and examples, I am sure it will be probably the best,
Have a wonderful day, M
I don't believe that OpenMM conda-forge packages yet support CUDA 11.3.
I believe that the CUDA 11.2 openmm conda-forge package should work in a docker image built with CUDA 11.3 toolkit and drivers installed and run on a machine with identical CUDA drivers, however.
I am a strong advocate for YANK, this package is one of the best out there. With just some updates, updated documentation, and examples, I am sure it will be probably the best,
We haven't had active funding to officially support YANK for a couple of years, so everything here is "best effort" at the moment! We'll try our best to provide more responsive support over the next few months.
When we update the Dockerfile
, we may be able to use much of the template @mikemhenry has built for perses, but this uses CUDA 11.2.2 to minimize the size of the docker image. It would still need to be tailored to build a CUDA 11.3 version.
Thanks John, CUDA 11.2.2 will be also fine.
Thanks, M
Hi Mike, did you have any luck building the images?
Thanks, M
@mmagithub sorry I haven't had a chance to get to this yet, but try this and let me know what issues you have:
# Start with CUDA base image
FROM nvidia/cuda:11.2.2-runtime-ubuntu20.04
MAINTAINER Mike Henry <[email protected]>
# Install miniconda
RUN apt-get update && apt-get install -y wget
RUN MINICONDA="Miniconda3-latest-Linux-x86_64.sh" && \
wget --quiet https://repo.continuum.io/miniconda/$MINICONDA && \
bash $MINICONDA -b -p /miniconda && \
rm -f $MINICONDA
ENV PATH /miniconda/bin:$PATH
# Add omnia
RUN conda config --add channels conda-forge
# Install yank
RUN conda install --yes yank
Basally using the old docker file, but
- using the cuda 11.2.2 runtime
- use the yank version that is on conda-forge
Hopefully this works for you! Let me know if you run into any errors or if this works, either way it will be really helpful!
Thanks Mike. My trial resulted in errors that some packages are not installed. eg.: from mpi4py import MPI ModuleNotFoundError: No module named 'mpi4py'
I am just wondering if you had already tried the container and it ran without errors. ?
Also, is it possible to include opencl support as well, being more generic and less problematic than CUDA ?
Hmmm, we might be missing a dep then in our package! Does this work (I'm just adding the mpi4py
to the install line)?
# Start with CUDA base image
FROM nvidia/cuda:11.2.2-runtime-ubuntu20.04
MAINTAINER Mike Henry <[email protected]>
# Install miniconda
RUN apt-get update && apt-get install -y wget
RUN MINICONDA="Miniconda3-latest-Linux-x86_64.sh" && \
wget --quiet https://repo.continuum.io/miniconda/$MINICONDA && \
bash $MINICONDA -b -p /miniconda && \
rm -f $MINICONDA
ENV PATH /miniconda/bin:$PATH
# Add omnia
RUN conda config --add channels conda-forge
# Install yank
RUN conda install --yes yank mpi4py
I have not tired the container at all, unfortunately I don't have time to work on the container right now, there are some other yank maintenance tasks I'm working on currently.
RE: opencl support
That should work out of the box, in the container run python -m openmm.testInstallation
or maybe python -m simtk.testInstallation
depending on the openmm version that gets pulled in. It should show the opencl platform as an option. See this page in the docs http://getyank.org/latest/yamlpages/options.html?highlight=opencl#platform for how to set the platform.
Thanks Mike. In earlier trials, I indeed tried to add mpi4py, ParmEd,cerberus,docopt,openmmtools to the docker build, until I managed to get it run, then it complained about CUDA. For every library of those, I realized that it was missing after the building and running the image. I finally felt frustrated and left the build and asked my question.
I will try the opencl and let you know.
Thanks
@mmagithub no worries! I feel your frustration! I suspect that the errors you were getting had a lot to do with using the defunct omnia
channel.
Do things work without using docker? Like if you just do a mamba install -c conda-forge yank
?
I will need to try that, I will update you,
Thanks