diff --git a/build/bin/eic-shell b/build/bin/eic-shell new file mode 100755 index 0000000000000000000000000000000000000000..bf833d0deade4cf9dbe04e5c03dbed065f02bb88 --- /dev/null +++ b/build/bin/eic-shell @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## Boilerplate to make pipes work +piped_args= +if [ -p /dev/stdin ]; then + # If we want to read the input line by line + while IFS= read line; do + if [ -z "$piped_args" ]; then + piped_args="${line}" + else + piped_args="${piped_args} +${line}" + fi + done +fi + +## Fire off the application wrapper +if [ ${piped_args} ] ; then + echo -e ${piped_args} | singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 eic-shell $@ +else + singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 eic-shell $@ +fi diff --git a/build/bin/ipython b/build/bin/ipython new file mode 100755 index 0000000000000000000000000000000000000000..30000603d66fd1fea82926f4115edf2abc783df1 --- /dev/null +++ b/build/bin/ipython @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## Boilerplate to make pipes work +piped_args= +if [ -p /dev/stdin ]; then + # If we want to read the input line by line + while IFS= read line; do + if [ -z "$piped_args" ]; then + piped_args="${line}" + else + piped_args="${piped_args} +${line}" + fi + done +fi + +## Fire off the application wrapper +if [ ${piped_args} ] ; then + echo -e ${piped_args} | singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 ipython $@ +else + singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 ipython $@ +fi diff --git a/build/bin/root b/build/bin/root new file mode 100755 index 0000000000000000000000000000000000000000..621bfae44c2a21cfab9ed334527955dc244ed05e --- /dev/null +++ b/build/bin/root @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## Boilerplate to make pipes work +piped_args= +if [ -p /dev/stdin ]; then + # If we want to read the input line by line + while IFS= read line; do + if [ -z "$piped_args" ]; then + piped_args="${line}" + else + piped_args="${piped_args} +${line}" + fi + done +fi + +## Fire off the application wrapper +if [ ${piped_args} ] ; then + echo -e ${piped_args} | singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 root $@ +else + singularity exec /home/sjoosten/projects/eic_container/build/lib/eic.sif.2.0.4 root $@ +fi diff --git a/containers/release/Dockerfile.in b/containers/release/Dockerfile.in index 8134a34de690fb49ac574436621a4cd8279b0875..843247ca4b345bab7c65e04ec0d379215559bbd2 100644 --- a/containers/release/Dockerfile.in +++ b/containers/release/Dockerfile.in @@ -51,7 +51,10 @@ RUN rm -rf /usr/local && ln -s /opt/view /usr/local ## the environment but still provided for backward compatibility (and documentation). COPY eic-shell /usr/local/bin/eic-shell COPY eic-env.sh /etc/eic-env.sh -COPY eic-env.sh /etc/profile.d/z10_eic-env.sh +COPY eic-env.sh /etc/profile.d/z10_eic-env.s + +## also make sure we have the older container_dev command available +COPY eic-shell /usr/local/bin/container_dev ## Setup fresh bashrc, useful for singularity COPY bashrc /etc/bash.bashrc diff --git a/deploy.py b/deploy.py index 2c838b60898ff7bff027412b13b811227ec86ff0..dbc6480211d9b3ef449c4d382672181cd4d9bde7 100755 --- a/deploy.py +++ b/deploy.py @@ -25,6 +25,7 @@ PROJECT_NAME='eic_container' IMAGE_ROOT='eic' PROGRAMS = ['eic-shell', + 'container_dev', 'root', 'ipython']