Dask seems to write to the /tmp folder. How can I change the folder that dask uses for temporary files?
Setting TMPDIR
could potentially cause problems as it might also effect other applications. An alternative is to use dask.config.set
>>> import dask
>>> with dask.config.set({'temporary_directory': '/path/to/tmp'}):
... pass
You could also add the lines
temporary_directory: /path/to/tmp
to .dask/config.yaml
(in your home directory) configuration docs
For some reason the accepted code doesn't work for me. I get this error: AttributeError: 'set' object has no attribute 'items'
Here's a version that works: dask.config.set(temporary_directory='/path/to/tmp')
Also note that you have to do this before you create your Client.
Setting the TMPDIR environment variable to the desired location via export TMPDIR=/my/path
seems to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With