mirror of
https://github.com/hanzo-ml/trainer.git
synced 2026-09-24 00:31:34 +00:00
fix: remove unnecessary setcap CAP_NET_BIND_SERVICE from MPI runtime docker file (#3286)
sshd in the MPI runtime listens on port 2222 (non-privileged), so CAP_NET_BIND_SERVICE is not needed. Also removes libcap2-bin which was only installed to provide the setcap binary. Fixes #3254 Signed-off-by: kapil27 <[email protected]>
This commit is contained in:
@@ -3,14 +3,10 @@ FROM nvidia/cuda:13.2.1-devel-ubuntu22.04
|
||||
|
||||
# Install libraries required for OpenMPI to work. Image installs OpenMPI 5.0.7
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
openssh-server openssh-client libcap2-bin \
|
||||
openssh-server openssh-client \
|
||||
g++ libopenmpi-dev \
|
||||
python3-dev pip && rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add capability to run sshd as non-root.
|
||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/sshd
|
||||
RUN apt remove libcap2-bin -y
|
||||
|
||||
# Configure mpiuser and home directory.
|
||||
RUN useradd -m mpiuser
|
||||
WORKDIR /home/mpiuser
|
||||
|
||||
@@ -3,14 +3,10 @@ FROM nvidia/cuda:13.2.1-devel-ubuntu22.04
|
||||
|
||||
# Install libraries required for OpenMPI to work. Image installs OpenMPI 5.0.7
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
openssh-server openssh-client libcap2-bin \
|
||||
openssh-server openssh-client \
|
||||
g++ libopenmpi-dev libblas-dev liblapack-dev liblapacke-dev \
|
||||
python3-dev pip && rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add capability to run sshd as non-root.
|
||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/sshd
|
||||
RUN apt remove libcap2-bin -y
|
||||
|
||||
# Configure mpiuser and home directory.
|
||||
RUN useradd -m mpiuser
|
||||
WORKDIR /home/mpiuser
|
||||
|
||||
Reference in New Issue
Block a user