Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit a21e2f8

Browse files
authored
Fix an issue of mpi4py (NVIDIA#475)
1 parent 6837c81 commit a21e2f8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

docker/Dockerfile.multi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ ENV LD_LIBRARY_PATH=/usr/local/tensorrt/lib:${LD_LIBRARY_PATH}
2929
COPY docker/common/install_polygraphy.sh install_polygraphy.sh
3030
RUN bash ./install_polygraphy.sh && rm install_polygraphy.sh
3131

32+
# Install mpi4py
33+
COPY docker/common/install_mpi4py.sh install_mpi4py.sh
34+
RUN bash ./install_mpi4py.sh && rm install_mpi4py.sh
35+
3236
# Install PyTorch
3337
ARG TORCH_INSTALL_TYPE="skip"
3438
COPY docker/common/install_pytorch.sh install_pytorch.sh

docker/common/install_base.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ init_ubuntu() {
1818
apt-get remove --purge -y tensorrt*
1919
fi
2020
pip uninstall -y tensorrt
21-
pip install mpi4py
2221
}
2322

2423
install_gcc_centos() {

docker/common/install_mpi4py.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
MPI4PY_VERSION="3.1.5"
6+
RELEASE_URL="https://github.com/mpi4py/mpi4py/archive/refs/tags/${MPI4PY_VERSION}.tar.gz"
7+
curl -L ${RELEASE_URL} | tar -zx -C /tmp
8+
# Bypassing compatibility issues with higher versions (>= 69) of setuptools.
9+
sed -i 's/>= 40\.9\.0/>= 40.9.0, < 69/g' /tmp/mpi4py-${MPI4PY_VERSION}/pyproject.toml
10+
pip install /tmp/mpi4py-${MPI4PY_VERSION}
11+
rm -rf /tmp/mpi4py*

0 commit comments

Comments
 (0)