Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
deepspeed
Commits
c0d5424f
Unverified
Commit
c0d5424f
authored
Sep 10, 2020
by
Jeff Rasley
Committed by
GitHub
Sep 10, 2020
Browse files
Add openmpi to dockerfile
parent
dca0b784
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
Dockerfile
Dockerfile
+29
-0
No files found.
Dockerfile
View file @
c0d5424f
FROM
nvidia/cuda:10.0-devel-ubuntu18.04
##############################################################################
# Temporary Installation Directory
##############################################################################
ENV
STAGE_DIR=/tmp
RUN
mkdir
-p
${
STAGE_DIR
}
##############################################################################
# Installation/Basic Utilities
##############################################################################
...
...
@@ -19,6 +25,29 @@ RUN add-apt-repository ppa:git-core/ppa -y && \
apt-get
install
-y
git
&&
\
git
--version
##############################################################################
# OPENMPI
##############################################################################
ENV
OPENMPI_BASEVERSION=4.0
ENV
OPENMPI_VERSION=${OPENMPI_BASEVERSION}.1
RUN
cd
${
STAGE_DIR
}
&&
\
wget
-q
-O
- https://download.open-mpi.org/release/open-mpi/v
${
OPENMPI_BASEVERSION
}
/openmpi-
${
OPENMPI_VERSION
}
.tar.gz |
tar
xzf -
&&
\
cd
openmpi-
${
OPENMPI_VERSION
}
&&
\
./configure
--prefix
=
/usr/local/openmpi-
${
OPENMPI_VERSION
}
&&
\
make
-j
"
$(
nproc
)
"
install
&&
\
ln
-s
/usr/local/openmpi-
${
OPENMPI_VERSION
}
/usr/local/mpi
&&
\
# Sanity check:
test -f /usr/local/mpi/bin/mpic++ && \
cd ${STAGE_DIR} && \
rm -r ${STAGE_DIR}/openmpi-${OPENMPI_VERSION}
ENV
PATH=/usr/local/mpi/bin:${PATH} \
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/mpi/lib:/usr/local/mpi/lib64:${LD_LIBRARY_PATH}
# Create a wrapper for OpenMPI to allow running as root by default
RUN
mv
/usr/local/mpi/bin/mpirun /usr/local/mpi/bin/mpirun.real
&&
\
echo
'#!/bin/bash'
>
/usr/local/mpi/bin/mpirun
&&
\
echo
'mpirun.real --allow-run-as-root --prefix /usr/local/mpi "$@"'
>>
/usr/local/mpi/bin/mpirun
&&
\
chmod
a+x /usr/local/mpi/bin/mpirun
##############################################################################
# Python
##############################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment