Search code examples
dockerlabel-studio

Problems running a docker container (maybe permission issues)


I am new to docker and I was trying to deploy the software (https://github.com/HumanSignal/label-studio) to a debian VM. I followed the instructions here: https://hub.docker.com/r/heartexlabs/label-studio#run-with-docker-compose but it seems like I am getting a permission error after executing:

docker run -it -p 8080:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest The error log is on this screenshot:

enter image description here

My question is: Is it some docker issue (me not setting permissions to some path) or something else? I tried executing with a root user and thus I expect the permissions to be no problem.


Solution

  • I got the same thing. Looks like a known issue: https://github.com/HumanSignal/label-studio/issues/3595

    They point to this: https://labelstud.io/guide/install.html#PermissionError-Errno-13-Permission-denied-label-studio-data-media

    Apparently the latest version requires root.

    $ sudo docker run -it --user root -p 8080:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest chown -R 1001:root /label-studio/data/
    $ sudo docker run -it -p 8080:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest
    

    Also, just opening up the perms on the folder works, but isn't secure.

    $ sudo chmod 777 mydata