Alwyn Mathew     Publication     Talks     Teaching     Blog     Resume

Permission denied writing to `/tmp/.tensorboard-info`

Tensorboard is one of the best visualization tool to monitor training of your deep neural network, regardless of the deep learning library, tensorflow or pytorch. If you are working in a server shared by many users, you have have faced an issue of denying permission to /tmp/.tensorboard-info when you try to start your tensorboard. This is mainly because of the different tensorboard versions that user use.

The writing of tensorboard info files introduced in #1806 caused permission problem under multi-user scenario. It directly create .tensorboard-info directory under /tmp.

Solution 1

Find out that owner of /tmp/.tensorboard-info with stat --format=%U /tmp/.tensorboard-info. That user - probably whoever created the directory - can chmod it or remove it.

sudo chmod 777 /tmp/.tensorboard-info

Turns out, tensorboard uses tempfile.tempdir to get the path to the temporary directory (usually /tmp/). In this directory the .tensorboard folder is created. It is possible to specify the temp directory returned by tempfile.tempdir by setting the environment variable TMPDIR.

Now we can simply force tensorboard to use another directory then /tmp/.tensorboard/, like /tmp/.<dir-name>/.tensorboard as below:

mkdir /tmp/.<dir-name>
TMPDIR=/tmp/.<dir-name> tensorboard --logdir="/path/to/log/"

Source: github issues

comments powered by Disqus