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 @@ -83,13 +83,19 @@ RUN . /opt/spack-environment/activate.sh && \
8383 cmake --install build && \
8484 echo 'export PATH="/opt/3DThesis/bin:$PATH"' >> /opt/spack-environment/activate.sh
8585
86- # Set entry point
87- RUN { \
88- 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 \
92- && echo 'exec "$@"'; \
86+ # Make .bashrc root profile (used on container restarts)
87+ # and add container entry point
88+ RUN mkdir -p /root \
89+ && { \
90+ echo "export OMPI_ALLOW_RUN_AS_ROOT=1"; \
91+ echo "export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1"; \
92+ echo ". /opt/spack/share/spack/setup-env.sh"; \
93+ echo ". /opt/spack-environment/activate.sh"; \
94+ } > /root/.bashrc \
95+ && { \
96+ echo '#!/bin/sh'; \
97+ echo ". /root/.bashrc"; \
98+ echo 'exec "$@"'; \
9399 } > /entrypoint.sh \
94100&& chmod a+x /entrypoint.sh \
95101&& ln -s /opt/views/view /opt/view
You can’t perform that action at this time.
0 commit comments