let init_env ~conda_env () =
let prefix = (envs_dir ~conda_env // conda_env.name) in
(* if we are already within the conda environment we want, do nothing;
otherwise, activate the new one *)
KEDSL.Program.(
shf "[ ${CONDA_PREFIX-none} != \"%s\" ] && source %s %s || echo 'Already in conda env: %s'"
prefix (activate ~conda_env) prefix prefix
)