Inpaint / src /util /slurm_util.py
ZehanWang's picture
Upload folder using huggingface_hub
864ec44 verified
raw
history blame
302 Bytes
# Author: Bingxin Ke
# Last modified: 2024-02-22
import os
def is_on_slurm():
cluster_name = os.getenv("SLURM_CLUSTER_NAME")
is_on_slurm = cluster_name is not None
return is_on_slurm
def get_local_scratch_dir():
local_scratch_dir = os.getenv("TMPDIR")
return local_scratch_dir