Skip to content

Update Dockerfile to avoid the additional clone #45

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

roumenguha
Copy link

@roumenguha roumenguha commented Feb 11, 2025

Description

I just tried to build this docker image and had some issues. This is with install_apt_packages(cfg) and install_libraries_from_source(cfg) commented out (i.e. a pure Python development environment). I'm using an AMD machine running Fedora 41. The issues are mostly due to numpy compilation failing for the following reasons, and their resolutions:

  1. missing Fortran compilers -> added gfortran to Dockerfile
  2. missing BLAS libraries (intel-mkl, atlas, lapack, openblas) -> added intel-mkl, libatlas-base-dev, liblapack-dev, and libblas-dev to Dockerfile
  3. numpy==1.20.2 contained some compilation issues, and was duplicated twice in the requirements.txt -> removed entirely from requirements.txt and install before other packages within create_venv.sh. The version is no longer specified.

Additionally

  • the EVO package required the tool unzip -> added unzip to Dockerfile
  • because I was changing the Dockerfile and the current implementation of it clones a new copy of the repo on develop, none of my changes were taking effect -> I added the ability to run the local copy, allowing me to build with changes that haven't been pushed to origin yet. This requires the Dockerfile to be moved to the root directory of the repo, due to how docker build works.

Here is proof of a successful build with install_apt_packages(cfg) and install_libraries_from_source(cfg) commented out:
image

And with them uncommented (the full build in 3106.5s):
image

Notes:

  • I haven't tried out the environment yet to make sure everything works. I will update this PR when I do.
  • I added ENV MKL_DEBUG_CPU_TYPE=5 to the Dockerfile. Apparently intel-mkl leaves some performance left on the table when using an AMD CPU. This env flag ameliorates that but may not be necessary. It may be possible to make this conditional on the CPU of the current machine.

I understand if you do not want to merge these changes. However, if you do want these changes with some modifications, please let me know and I'll be happy to make them. Thanks for your work!

Signed-off-by: Roumen Guha <roumen.guha@gmail.com>
@changh95
Copy link
Owner

Thanks a lot!

I worked on this projects years back and left it as is since. Many things in this project are probably super outdated, and I was not much a good of a programmer at the time too. I think there's tons of stuffs that can be improved.

I'd like to merge your PR, but you mentioned you'll try it out and update the PR once you do.
I'll merge it after your update! 👍

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