Skip to content

Commit

Permalink
Spack ubuntu mpi operator (#5)
Browse files Browse the repository at this point in the history
* we can use the original efa as a base

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Feb 3, 2023
1 parent a492315 commit 4ba8061
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spack-ubuntu-libfabric-ssh/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG tag="20.04"
FROM ghcr.io/rse-ops/lammps-efa:ubuntu-${tag}

# This is added for the mpi-operator
# Add priviledge separation directoy to run sshd as root.
RUN 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.
ARG port=22
RUN sed -i "s/[ #]\(.*StrictHostKeyChecking \).*/ \1no/g" /etc/ssh/ssh_config \
&& echo " UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config \
&& sed -i "s/[ #]\(.*Port \).*/ \1$port/g" /etc/ssh/ssh_config \
&& sed -i "s/#\(StrictModes \).*/\1no/g" /etc/ssh/sshd_config \
&& sed -i "s/#\(Port \).*/\1$port/g" /etc/ssh/sshd_config
6 changes: 6 additions & 0 deletions spack-ubuntu-libfabric-ssh/uptodate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dockerbuild:
build_args:
tag:
key: "ubuntu"
versions:
- "20.04"

0 comments on commit 4ba8061

Please sign in to comment.