Unverified Commit 115cd2e6 authored by guoshzhao's avatar guoshzhao Committed by GitHub
Browse files

Dockerfile: Add Package - Install openmpi for ROCm images (#181)

**Description**
Install openmpi-4.0.0 for ROCm images.
parent 7d947757
...@@ -2,6 +2,7 @@ FROM nvcr.io/nvidia/pytorch:20.12-py3 ...@@ -2,6 +2,7 @@ FROM nvcr.io/nvidia/pytorch:20.12-py3
# OS: # OS:
# - Ubuntu: 20.04 # - Ubuntu: 20.04
# - OpenMPI: 4.0.5
# - Docker Client: 20.10.8 # - Docker Client: 20.10.8
# NVIDIA: # NVIDIA:
# - CUDA: 11.1.1 # - CUDA: 11.1.1
......
...@@ -2,6 +2,7 @@ FROM rocm/pytorch:rocm4.0_ubuntu18.04_py3.6_pytorch_1.7.0 ...@@ -2,6 +2,7 @@ FROM rocm/pytorch:rocm4.0_ubuntu18.04_py3.6_pytorch_1.7.0
# OS: # OS:
# - Ubuntu: 18.04 # - Ubuntu: 18.04
# - OpenMPI: 4.0.5
# - Docker Client: 20.10.8 # - Docker Client: 20.10.8
# AMD: # AMD:
# - ROCm: 4.0 # - ROCm: 4.0
...@@ -49,6 +50,18 @@ RUN cd /tmp && \ ...@@ -49,6 +50,18 @@ RUN cd /tmp && \
tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ && \ tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ && \
rm docker.tgz rm docker.tgz
# Install OpenMPI
ENV OPENMPI_VERSION=4.0.5
RUN cd /tmp && \
wget -q https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-${OPENMPI_VERSION}.tar.gz && \
tar xzf openmpi-${OPENMPI_VERSION}.tar.gz && \
cd openmpi-${OPENMPI_VERSION} && \
./configure --enable-orterun-prefix-by-default && \
make -j $(nproc) all && \
make install && \
ldconfig && \
rm -rf /tmp/openmpi-${OPENMPI_VERSION}*
# Configure SSH # Configure SSH
RUN mkdir -p /root/.ssh && \ RUN mkdir -p /root/.ssh && \
touch /root/.ssh/authorized_keys && \ touch /root/.ssh/authorized_keys && \
......
...@@ -2,6 +2,7 @@ FROM rocm/pytorch:rocm4.2_ubuntu18.04_py3.6_pytorch_1.7.0 ...@@ -2,6 +2,7 @@ FROM rocm/pytorch:rocm4.2_ubuntu18.04_py3.6_pytorch_1.7.0
# OS: # OS:
# - Ubuntu: 18.04 # - Ubuntu: 18.04
# - OpenMPI: 4.0.5
# - Docker Client: 20.10.8 # - Docker Client: 20.10.8
# AMD: # AMD:
# - ROCm: 4.2 # - ROCm: 4.2
...@@ -49,6 +50,18 @@ RUN cd /tmp && \ ...@@ -49,6 +50,18 @@ RUN cd /tmp && \
tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ && \ tar --extract --file docker.tgz --strip-components 1 --directory /usr/local/bin/ && \
rm docker.tgz rm docker.tgz
# Install OpenMPI
ENV OPENMPI_VERSION=4.0.5
RUN cd /tmp && \
wget -q https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-${OPENMPI_VERSION}.tar.gz && \
tar xzf openmpi-${OPENMPI_VERSION}.tar.gz && \
cd openmpi-${OPENMPI_VERSION} && \
./configure --enable-orterun-prefix-by-default && \
make -j $(nproc) all && \
make install && \
ldconfig && \
rm -rf /tmp/openmpi-${OPENMPI_VERSION}*
# Configure SSH # Configure SSH
RUN mkdir -p /root/.ssh && \ RUN mkdir -p /root/.ssh && \
touch /root/.ssh/authorized_keys && \ touch /root/.ssh/authorized_keys && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment