How to resolve permission error related to DeepFace in Dataiku?

YashP
YashP Registered Posts: 2 ✭✭

I am using DeepFace library in Dataiku. When I write code in Jupyter notebook and try to import the library, I am able to do it. But when I try to export it as python recipe and try to execute the same code it's not working. It gives me Permission Error.
How to resolve this?

Tagged:

Best Answer

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,070 Neuron
    Answer ✓

    This error is happening since the DeepFace package is trying to write to a folder you don't have permissions to. You can see the code doing that here:

    https://github.com/serengil/deepface/blob/cc484b54be5188eb47faf132995af16a871d70b9/deepface/commons/folder_utils.py#L15

    On the same file you can see the get_deepface_home() function tries to find the DEEPFACE_HOME environment variable and defaults to the current directory + .deepface which is why you get /data/dataiku/.deepface. You can try to set the DEEPFACE_HOME environment variable to a folder your user ID has full write permissions before you import deepface like this:

    import os
    os.environ["DEEPFACE_HOME"] = "/some/folder/"
    

Answers

Setup Info
    Tags
      Help me…