Skip to content

Commit

Permalink
fix: apt-get update cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
vexingly authored Aug 16, 2024
1 parent 522e9d9 commit 60c17e7
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ompp-run-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ ARG DEBIAN_FRONTEND=noninteractive

# For OncoSim MPI inject to the default bashrc as non other exist, can change later
RUN echo "ulimit -S -s 65536" >> etc/bash.bashrc && \
# update base image, install dependencies, cleanup
# update base image, install dependencies, cleanup, install OpenSSH for MPI to communicate between containers
apt-get update && \
apt-get install -y \
openssh-client \
openssh-server \
apt-utils \
curl \
jq \
Expand All @@ -64,18 +66,14 @@ RUN curl -LO "${KUBECTL_URL}" \

# set local openM++ timezone
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

ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime && \
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 && \
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

Expand Down Expand Up @@ -104,4 +102,4 @@ USER $OMPP_USER
SHELL ["/bin/bash"]

# default command check MPIEXEC verson, when used as a kubernetes container override with custom mpiexec execution
CMD mpiexec -V && ulimit -S -s
CMD mpiexec -V && ulimit -S -s

0 comments on commit 60c17e7

Please sign in to comment.