Skip to content
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

feat: add openssh to ompp image for mpi-operator v2 #123

Merged
merged 8 commits into from
Aug 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add openssh for mpi-operator v2
vexingly committed Aug 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b5362c837016dd1e5d226d294e42727e42e698d3
14 changes: 14 additions & 0 deletions ompp-run-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -52,6 +52,7 @@ RUN echo "ulimit -S -s 65536" >> etc/bash.bashrc && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*

# Install kubectl cli to be able to utilize file transfer functionality between containers
ARG KUBECTL_VERSION=v1.28.2
ARG KUBECTL_URL=https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
ARG KUBECTL_SHA=c922440b043e5de1afa3c1382f8c663a25f055978cbc6e8423493ec157579ec5
@@ -65,6 +66,19 @@ RUN curl -LO "${KUBECTL_URL}" \
RUN rm -f /etc/localtime && \
ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime

# Install OpenSSH for MPI to communicate between containers
RUN apt-get install -y --no-install-recommends openssh-client openssh-server && \
mkdir -p /var/run/sshd

# Allow OpenSSH to talk to containers without asking for confirmation
# by disabling StrictHostKeyChecking.
# mpi-operator mounts the .ssh folder from a Secret. For that to work, we need
# to disable UserKnownHostsFile to avoid write permissions.
# Disabling StrictModes avoids directory and files read permission checks.
RUN sed -i 's/[ #]\(.*StrictHostKeyChecking \).*/ \1no/g' /etc/ssh/ssh_config && \
echo " UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config && \
sed -i 's/#\(StrictModes \).*/\1no/g' /etc/ssh/sshd_config

# Done with installation
# set user, work directory and entry point
#