ann-benchmarks icon indicating copy to clipboard operation
ann-benchmarks copied to clipboard

python3 create_website.py to generate website, ERROR 'Permission denied'

Open lajiyuan opened this issue 3 years ago • 4 comments

Should we execute "chmod -R 777 results" after writing out the result folder every time, otherwise we will not have read permission and we cannot use create_website.py to generate a website?

lajiyuan avatar Mar 23 '21 03:03 lajiyuan

The idea is to to run create_website.py with sudo. The docker container writes the result files as root, and create_website.py will cache some computations and needs write access to these files. @erikbern Maybe we should run the docker images as the actual user.

maumueller avatar Mar 23 '21 10:03 maumueller

I think Docker generally likes to run as the superuser on a system, and I'm not sure if we have control over that, but I could be wrong?

My preference here would be to not mess around with permissions if possible. Maybe it's possible to write the website to a different directory or to mount a subdirectory of the results/ directory?

erikbern avatar Mar 23 '21 15:03 erikbern

I think it's pretty straight-forward to do, see e.g., https://github.com/lemire/docker_programming_station/blob/master/Dockerfile#L21-L27, from https://lemire.me/blog/2020/05/22/programming-inside-a-container/.

The problem is not with the website creation, but with the hdf5 files being owned by root, and the metrics scripts trying to cache metrics by writing them into the hdf5 file.

maumueller avatar Mar 23 '21 15:03 maumueller

If it can be fixed in the Dockerfile, let's definitely do that. I didn't realize it was possible.

erikbern avatar Mar 23 '21 16:03 erikbern