I’m doing it as part of the sbatch script, it should be set on the compute node. But I’m not using machine files so maybe it’s different?
I just start the processes from within the Julia script with
using ClusterManagers
addprocs(SlurmManager(nworkers))
The is also the --project=path/to/environment
flag that you can try using instead, I don’t remember if I tried that on my cluster (there are some older discussions here about workers and environment activation)