Skip to content

Commit 57b5860

Browse files
committed
create /.bashrc for intended restart behavior
1 parent 668787c commit 57b5860

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docker/ubuntu

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ RUN . /opt/spack-environment/activate.sh && \
8585

8686
# Set entry point
8787
RUN { \
88+
echo "export OMPI_ALLOW_RUN_AS_ROOT=1" \
89+
&& echo "export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" \
90+
&& echo ". /opt/spack/share/spack/setup-env.sh" \
91+
&& echo ". /opt/spack-environment/activate.sh" \
92+
} > /root/.bashrc \
93+
&& { \
8894
echo '#!/bin/sh' \
89-
&& echo '.' /opt/spack-environment/activate.sh \
90-
&& echo export OMPI_ALLOW_RUN_AS_ROOT=1 \
91-
&& echo export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
95+
&& echo ". /root/.bashrc" \
9296
&& echo 'exec "$@"'; \
9397
} > /entrypoint.sh \
9498
&& chmod a+x /entrypoint.sh \

0 commit comments

Comments
 (0)