File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,19 @@ RUN cd /opt/spack-environment \
6666RUN cd /opt/spack-environment && \
6767 spack env activate --sh -d . > activate.sh
6868
69- # Set entry point
70- RUN { \
71- echo '#!/bin/sh' \
72- && echo '.' /opt/spack-environment/activate.sh \
73- && echo export OMPI_ALLOW_RUN_AS_ROOT=1 \
74- && echo export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 \
75- && echo 'exec "$@"'; \
69+ # Make .bashrc root profile (used on container restarts)
70+ # and add container entry point
71+ RUN mkdir -p /root \
72+ && { \
73+ echo "export OMPI_ALLOW_RUN_AS_ROOT=1"; \
74+ echo "export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1"; \
75+ echo ". /opt/spack/share/spack/setup-env.sh"; \
76+ echo ". /opt/spack-environment/activate.sh"; \
77+ } > /root/.bashrc \
78+ && { \
79+ echo '#!/bin/sh'; \
80+ echo ". /root/.bashrc"; \
81+ echo 'exec "$@"'; \
7682 } > /entrypoint.sh \
7783&& chmod a+x /entrypoint.sh \
7884&& ln -s /opt/views/view /opt/view
You can’t perform that action at this time.
0 commit comments