Fixed Dockerfile for Apple Silicon (M4 Pro)#35
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the ReMKiT1D Docker container for ARM64/Apple Silicon architecture. The changes include version bump to 1.3.0, removal of Python dependencies that weren't needed, ARM64-specific compiler optimizations, improved reliability for HDF5 installation, and environment variable cleanup.
Key Changes:
- Added ARM64-specific optimization flags (
-mcpu=native) to PETSc configuration - Implemented fallback mechanism for HDF5 installation to handle git clone failures
- Removed duplicate
LD_LIBRARY_PATHenvironment variable declarations in favor ofRUN echocommands
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| RUN echo LD_LIBRARY_PATH=/home/mpich-install/lib:$LD_LIBRARY_PATH | ||
| RUN echo LD_LIBRARY_PATH=/home/sundials/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
These RUN echo commands only print the variable values but don't actually set them. The LD_LIBRARY_PATH environment variable is not being configured. Either remove these lines if they're debugging statements, or replace them with ENV LD_LIBRARY_PATH=/home/mpich-install/lib:/home/sundials/lib:$LD_LIBRARY_PATH to properly set the variable.
| RUN echo LD_LIBRARY_PATH=/home/mpich-install/lib:$LD_LIBRARY_PATH | |
| RUN echo LD_LIBRARY_PATH=/home/sundials/lib:$LD_LIBRARY_PATH | |
| ENV LD_LIBRARY_PATH=/home/mpich-install/lib:/home/sundials/lib:$LD_LIBRARY_PATH |
| ENV PATH=$PATH:/home/installs/petsc | ||
| ENV PATH=$PATH:/home/installs/hdf5 | ||
| ENV PATH=$PATH:/home/installs/json-fortran/jsonfortran-gnu-8.2.5 | ||
| ENV PATH=$PATH:/home/mpich-install/bin:$PATH |
There was a problem hiding this comment.
The PATH is appended with :$PATH at the end, which creates a redundant reference. This line adds /home/mpich-install/bin to PATH and then appends the entire PATH again. It should be ENV PATH=$PATH:/home/mpich-install/bin or ENV PATH=/home/mpich-install/bin:$PATH.
| ENV PATH=$PATH:/home/mpich-install/bin:$PATH | |
| ENV PATH=$PATH:/home/mpich-install/bin |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #35 +/- ##
=======================================
Coverage 54.20% 54.20%
=======================================
Files 239 239
Lines 10124 10124
=======================================
Hits 5487 5487
Misses 4637 4637 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cleaning whitespace Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Cleaning whitespace Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Cleaning whitespace Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
alfieadhemar
left a comment
There was a problem hiding this comment.
Dockerfile succsefully compiled/verified on M2
Fixes issue #34
Changes:
fetch-packdisconnects during the build processTesting: