-
Notifications
You must be signed in to change notification settings - Fork 229
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
docker: revamp base deployment #2162
Conversation
mloubout
commented
Jul 10, 2023
- Revamp base deployment not to rebuild nvhpc. Reduces the number of jobs and should reduce CI time since all extras are mostly an env var on top of the existing image. Little bit more verbose but I don't think it's really an issue there
- Added icx as a separate image
- Fix MPI flags for oneapi
d68ad3b
to
af219b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #2162 +/- ##
==========================================
- Coverage 87.06% 87.04% -0.03%
==========================================
Files 223 223
Lines 39931 39946 +15
Branches 5174 5177 +3
==========================================
+ Hits 34765 34769 +4
- Misses 4589 4598 +9
- Partials 577 579 +2
|
304b3a7
to
00b2eb5
Compare
00b2eb5
to
3bcd0b2
Compare
8da0f96
to
fae6d62
Compare
fae6d62
to
10b8a48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GTO once green and comments addressed.
@@ -18,6 +23,7 @@ RUN python3 -m venv /venv && \ | |||
/venv/bin/pip install --no-cache-dir --upgrade pip && \ | |||
/venv/bin/pip install --no-cache-dir jupyter && \ | |||
/venv/bin/pip install --no-cache-dir wheel && \ | |||
eval "$MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir mpi4py" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does MPI4PY_FLAGS come from? A quick google indicates zero hits. Add link/comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a made up one I made to handle all our different compilers and arches
pyrevolve | ||
scipy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update any install instructions - what happens when new users try the tutorials? Will they know that these requirements need to be installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install instruvtions should still be the same and examples should always be installed with .[extras]
these were leftover that should have been moved here
conftest.py
Outdated
@@ -21,6 +21,11 @@ | |||
MPI = None | |||
|
|||
|
|||
def pytest_collectstart(collector): | |||
if collector.fspath and collector.fspath.ext == '.ipynb': | |||
collector.skip_compare += ('text/latex',) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://nbval.readthedocs.io/en/latest/#Skipping-certain-output-types
This just avoid failures for different sympy version printing slightly different latex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needed to be moved to root directory so that conftest
is found when testing the examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know, so this cancels out my LATEX changes in the other PR?
a0f2f15
to
aad6f20
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
2f32636
to
ae615c1
Compare
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: cleanup | ||
run: docker system prune -a -f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually need to prune everything? can we not just prune ourselves?
this might kill for example my local docker images 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not touch your images only the 'action" user one, always been there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, I was pretty sure "docker system prune" were a system-level action, that is as if it were issued by the docker
group?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhmmm
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: [gcc, icc, icx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop icc and just focus on icx (and clearly gcc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought so too wasn't sure if we wanted to keep it until intel drop it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would agree to drop it. Worst case scenario if someone is so eager to use icc by default, we could always point out to use the latest stable release
@@ -707,6 +709,17 @@ def __init__(self, *args, **kwargs): | |||
if mpi_distro != 'IntelMPI': | |||
warning("Expected Intel MPI distribution with `%s`, but found `%s`" | |||
% (self.__class__.__name__, mpi_distro)) | |||
self.cflags.insert(0, '-cc=%s' % self.CC) | |||
|
|||
def get_version(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
who calls this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codepy
does, it's basically copied from there but making sure the -cc
doesn't make it error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok. Could use a small comment, but that's fine
@@ -321,7 +321,8 @@ def _arg_check(self, args, size, interval): | |||
upper = interval.upper | |||
else: | |||
# Autopadding causes non-integer upper limit | |||
upper = interval.upper.subs(args) | |||
from devito.symbolics import normalize_args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sooner or later we will have to fix these cycling imports
docker/Dockerfile.amd
Outdated
######################################################################## | ||
# HIPCC for GPUs (HIP) | ||
######################################################################## | ||
# This will only trigger if arch is hip since the final stage depends on it | ||
FROM sdk-base as hip | ||
|
||
# Install OpenMPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was OpenMPI expanded out ? there must be a logic, but I'm missing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, for CC=, CXX= etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, decided to go concervative and force all the compiler for openmpi we can revisit
pyrevolve | ||
scipy | ||
distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent
flake8>=2.1.0 | ||
nbval | ||
scipy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent
@@ -12,4 +9,4 @@ codepy>=2019.1 | |||
click<9.0 | |||
multidict | |||
anytree>=2.4.3,<=2.9.0 | |||
distributed<2023.8 | |||
cloudpickle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fantastic 👍
ae615c1
to
066d7c0
Compare
self.stop = stop | ||
self.step = step | ||
self.num = num | ||
self.start = float(start) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
066d7c0
to
8f3ceb0
Compare
f54a46a
to
68ddd67
Compare
@@ -25,6 +25,7 @@ jobs: | |||
env: | |||
DEVITO_LANGUAGE: "openmp" | |||
DEVITO_ARCH: "gcc-9" | |||
OMP_NUM_THREADS: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in retrospect, I'm not sure about this one. Don't we want to test the numerical accuracy of MPI+OpenMP tests
@@ -707,6 +709,17 @@ def __init__(self, *args, **kwargs): | |||
if mpi_distro != 'IntelMPI': | |||
warning("Expected Intel MPI distribution with `%s`, but found `%s`" | |||
% (self.__class__.__name__, mpi_distro)) | |||
self.cflags.insert(0, '-cc=%s' % self.CC) | |||
|
|||
def get_version(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok. Could use a small comment, but that's fine
68ddd67
to
4202291
Compare
@@ -10,9 +10,9 @@ Devito provides several images that target different architectures and compilers | |||
|
|||
We provide two CPU images: | |||
- `devito:gcc-*` with the standard GNU gcc compiler. | |||
- `devito:icc-*` with the Intel C compiler for Intel architectures. | |||
- `devito:icx-*` with the Intel C compiler for Intel architectures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic. GTG for me