Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Added a basic Dockerfile to improve dev experience #610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ankitvgupta
Copy link

@ankitvgupta ankitvgupta commented Sep 7, 2023

I made a simple docker container (heavily influenced on the official Tensorflow docker container that I've used for other deep learning projects, and sharing some of the same features as the official pytorch and openfold containers. I did this mostly because I didn't want to change the version of CUDA and other packages installed on my linux box, and figured this would enable some nice portability for users who I'd imagine are often running ESM in a Docker-based HPC environment like Kubernetes or AWS Batch.

In particular, this container

  • Is based off of an NVIDIA CUDA base image (uses CUDA 11.8 though that's compatible with this version of pytorch built against 11.3, providing some forward usability).
  • Uses ubuntu 22.
  • Includes Miniconda, reflecting the environment.yml file included in the repo, and builds that environment.
  • Includes the appropriate apt-get packages needed to install esm and openfold.
  • can be easily updated by users looking to work with pytorch or tensorflow since the underlying cuda installation works on both.

Build steps

 docker build -f Dockerfile -t esm .

Running the container

docker run -it  --rm --runtime=nvidia --gpus all esm
conda activate esmfold
# Whatever else you want to do!

I'd be happy to follow up with a docker-compose.yml file to further simplify build/usage, and to add some CI/CD automation to add container builds to Github Actions, if of interest. Figured I'd check with the maintainers first to see if this was of interest before continuing though.

@facebook-github-bot
Copy link

Hi @ankitvgupta!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 7, 2023
@Mar-Gra-creator
Copy link

Hi there

Is it already possible to use the container and how? I tried but without success....

MG

@ankitvgupta
Copy link
Author

@Mar-Gra-creator what error do you get?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants