getavalon / docker

Avalon in a Dockerfile
MIT License
5 stars 2 forks source link

Permission denied for example project #43

Open mottosso opened 6 years ago

mottosso commented 6 years ago

Examples are located in the volume provided by this repo, but is mounted read-only which means that examples can't be opened nor saved.

To reproduce

$ avalon --import batman
$ avalon

Launch any example asset.

Running action: maya2015
ERROR:avalon.pipeline.Action:Could not copy application file: [Errno 13] Permission denied: 'a:\\git\\avalon-examples\\projects/batman/assets/Bruce/work/modeling/maya\\workspace.mel'

Workaround

  1. Copy a:\git\avalon-examples to e.g. c:\avalon-examples
  2. Set AVALON_EXAMPLES=c:\avalon-examples
  3. Set AVALON_PROJECTS=c:\avalon-examples\projects
  4. Launch Avalon
tokejepsen commented 6 years ago

Could we maybe catch or pre-test the permission error and ask the user to set a location where there is read/write permission?

tokejepsen commented 6 years ago

The issue is here where when root or AVALON_PROJECTS is not set then it defaults to the examples directory.

We could query for write permission here, and failing that inform the user about what went wrong and how to fix it?

mottosso commented 6 years ago

I expect this will be solved alongside https://github.com/getavalon/docker/issues/22#issuecomment-407038095 as at that point all of Avalon will reside on the local drive.

I'll push what I have so far, would be great if you were able to pick it up from there. It's got the mechanism in place and copies all dependencies, it just isn't copying the Avalon Python dependencies yet.

https://github.com/getavalon/docker/pull/53