Skip to content

Commit

Permalink
ported AI and preprocessing module to singularity
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zoechbauer authored and Alexander Zoechbauer committed Oct 10, 2023
1 parent c6110ff commit b106763
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ai/containers/base-container.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ Stage: build
%setup

%files
<<<<<<< HEAD
#Staging files necessary individually
#instead of whole T6.5 repo keeps container size to a minimum
./ai/env-files /home/ai/env-files
./ai/src /home/ai/src
./ai/tests /home/ai/tests
./ai/setup.py /home/ai/setup.py
./ai/README.md /home/ai/README.md
=======
#./requirements.txt /home/requirements.txt
#../ai/env-files/pytorch-env-container.txt /home/requirements.txt
../ /home/ai
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)

%environment
export LC_ALL=C
Expand All @@ -26,15 +32,25 @@ Stage: build
echo "Upgrade pip"
pip install --upgrade pip
echo "Installing python requirements"
<<<<<<< HEAD

pip install -r home/ai/env-files/pytorch-env-container.txt
echo "Installing python requirements"
pip install -e home/ai
=======
pip install -r /home/ai/env-files/pytorch-env-container.txt
echo "Installing python requirements"
pip install -e /home/ai
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)

%runscript
python -V
echo "packages installed:"
<<<<<<< HEAD
cat home/ai/env-files/pytorch-env-container.txt
=======
cat /home/ai/env-files/pytorch-env-container.txt
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)
echo "Accessing itwinai module:"
itwinai --help

Expand All @@ -54,4 +70,10 @@ Stage: build
Version v0.0.1

%help
<<<<<<< HEAD
This is the base image of the itwinai library in Singularity.
=======
This is a small demo building an python environment derived from the
demo container used to illustrate a def file that uses all
supported sections.
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)
7 changes: 7 additions & 0 deletions ai/containers/build-base-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
IMAGE_NAME="$1"

if [ -z "$IMAGE_NAME" ]; then
<<<<<<< HEAD
IMAGE_NAME=ai/containers/base-container.sif
fi

singularity build $IMAGE_NAME ai/containers/base-container.def
=======
IMAGE_NAME=base-container.sif
fi

singularity build $IMAGE_NAME base-container.def
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)
7 changes: 7 additions & 0 deletions use-cases/mnist/containers/build-preproc-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
IMAGE_NAME="$1"

if [ -z "$IMAGE_NAME" ]; then
<<<<<<< HEAD
IMAGE_NAME=use-cases/mnist/containers/preproc-container.sif
fi

singularity build $IMAGE_NAME use-cases/mnist/containers/preproc-container.def
=======
IMAGE_NAME=preproc-container.sif
fi

singularity build $IMAGE_NAME preproc-container.def
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)
4 changes: 4 additions & 0 deletions use-cases/mnist/containers/preproc-container.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ Stage: build
%setup

%files
<<<<<<< HEAD
./use-cases/mnist/env-files/preproc-env-container.txt /home/preproc-env-container.txt
=======
../env-files/preproc-env-container.txt /home/preproc-env-container.txt
>>>>>>> 00abab4 (ported AI and preprocessing module to singularity)

%environment
export LC_ALL=C
Expand Down

0 comments on commit b106763

Please sign in to comment.