Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile refinements and add Apptainer definition #139

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

Conversation

orbsmiv
Copy link

@orbsmiv orbsmiv commented Nov 28, 2024

Brief overview of PR changes

Dockerfile:

  • Uses a multi-stage build to minimise the layers and size of the final image. Also allows targeting of dev pkg installs.
  • Replace apt (primarily designed for interactive use) with apt-get

Apptainer definition file:

  • Broadly replicates Dockerfile process, also using a multi-stage build.
  • The current recommendation to build a Docker image and then copy this to an HPC for converting to Apptainer is potentially problematic because...
    • Many HPCs are x86_64 whereas users may be building on more recent ARM-based Apple systems. It is possible to target a specific arch when building an image but this would need to be made clear in the documentation.
    • Not all features from a Docker image are portable to the Apptainer sif format.

Issues:

  • triton dependency is only available as compiled x86_64 wheel on pypi.org so ARM-based builds aren't currently possible without moving the triton install into a separate compile step.

Copy link

google-cla bot commented Nov 28, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.


WORKDIR /app/alphafold

CMD ["python3", "run_alphafold.py", "--help"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this would be split into a separate ENTRYPOINT and CMD sections, e.g.

ENTRYPOINT ["python3", "run_alphafold.py"]

CMD ["--help"]

It would then be possible to pass the arguments directly to the Docker command, e.g.

docker run -it alphafold3 --output_dir=/root/af_output

However, this would involve rewriting the documentation and is arguably less intuitive so I'm broadly replicating the current functionality.


# Add the AlphaFold 3 source code from GitHub to the image and
# set the working directory to there
ADD https://github.com/google-deepmind/alphafold3.git#v${ALPHAFOLD_VERSION} /app/alphafold
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This takes a different approach to the existing Dockerfile (which copies the contents from the local repository) and instead allows the Docker build to act as a stand-alone process.

Copy link

@mmtmn mmtmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants