# Use Singularity
Build a singularity sandbox:
1. Transfer image ubuntu-v20.04.simg from `/opt/site/examples/open3d/` to your local machine.
2. Make sure singularity is installed in your computer. For installation please look at the installation instructions in https://docs.sylabs.io/guides/2.6/user-guide/quick_start.html#quick-installation-steps
3. Once singualrity is installed you can use sandbox to install additional packages. Use the following
`sudo singularity build --sandbox ubuntu-v20.04 ubuntu-v20.04.simg`
This will a create directory "ubuntu-v20.04".
4. Get an interactive shell in the sandbox
`export SINGULARITYENV_PREPEND_PATH="/opt/miniconda3/bin"`
`sudo singularity shell --writable ubuntu-v20.04`
`singularity build ubuntu-v20.04.simg ubuntu-v20.04`
This will update the image
5. To replicate process in `%environment` def, once setting writable shell in sanbx, create `/environemnt` and enter the commands.
6. Equivalent to `%runscript`, inside sandbox create `/ singularity` or or newer versions, try:
`/.singularity.d/runscript`