Update Dockerfile to avoid the additional clone
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:
- missing Fortran compilers -> added
gfortranto Dockerfile - missing BLAS libraries (intel-mkl, atlas, lapack, openblas) -> added
intel-mkl,libatlas-base-dev,liblapack-dev, andlibblas-devto Dockerfile -
numpy==1.20.2contained some compilation issues, and was duplicated twice in therequirements.txt-> removed entirely fromrequirements.txtand install before other packages withincreate_venv.sh. The version is no longer specified.
Additionally
- the
EVOpackage required the toolunzip-> addedunzipto 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 tooriginyet. This requires the Dockerfile to be moved to the root directory of the repo, due to howdocker buildworks.
Here is proof of a successful build with install_apt_packages(cfg) and install_libraries_from_source(cfg) commented out:
And with them uncommented (the full build in 3106.5s):
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=5to the Dockerfile. Apparentlyintel-mklleaves 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!
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! 👍