pysepal.scripts.scratch#

Temporary directories that land on local disk.

On a SEPAL sandbox $TMPDIR is unset and /tmp is nfs4 under the user’s home export, so tempfile.mkdtemp() writes to a network filesystem and against the storage quota. /var/tmp is container-local and wiped with the session.

Functions

on_sepal

Whether this process runs inside a SEPAL sandbox, which exports SEPAL=true.

scratch_dir

Create a new temporary directory under scratch_root(); the caller owns cleanup.

scratch_root

Local disk on SEPAL, the stdlib temp dir anywhere else.