Some packages' installation have permission related errors in Clara-FL

Hi,

I was using clara-fl and below errors shown after i start the client.
It seems like the skimage cannot be installed because of permission issues? Same issues happen when i tried to use torchvision.models.vgg16

Any suggestions would be appreciated!

File "/workspace/run_1/mmar_c1/custom/post_transforms.py", line 14, in <module>
    from skimage import metrics
  File "/opt/conda/lib/python3.8/site-packages/skimage/__init__.py", line 135, in <module>
    from .data import data_dir
  File "/opt/conda/lib/python3.8/site-packages/skimage/data/__init__.py", line 270, in <module>
    _init_pooch()
  File "/opt/conda/lib/python3.8/site-packages/skimage/data/__init__.py", line 255, in _init_pooch
    os.makedirs(data_dir, exist_ok=True)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 1 more time]
  File "/opt/conda/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/yuling'

------------------------------------------------------------------------------------------------------------------

  File "/workspace/run_1/mmar_org1/custom/criterion.py", line 17, in __init__
    vgg16 = models.vgg16(pretrained=True)
  File "/opt/conda/lib/python3.8/site-packages/torchvision/models/vgg.py", line 157, in vgg16
    return _vgg('vgg16', 'D', False, pretrained, progress, **kwargs)
  File "/opt/conda/lib/python3.8/site-packages/torchvision/models/vgg.py", line 99, in _vgg
    state_dict = load_state_dict_from_url(model_urls[arch],
  File "/opt/conda/lib/python3.8/site-packages/torch/hub.py", line 504, in load_state_dict_from_url
    os.makedirs(model_dir)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/conda/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 1 more time]
  File "/opt/conda/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/yuling' ```

I figured it out. Thanks!

Other people may have the same problem so please try to post the fix you found rather than just saying you fixed it! If anybody else is reading this, the issue seems to be related to the problems raised in these threads ([1] [2]), i.e. a non-essential package that is not a dependecy for most scikit-image functions attempting to create a directory in a location that is often inaccessible in HPCs, and a fix that worked for me was forcibly removing poosh with conda remove pooch --force.

Hi thanks for your suggestion.
My solution was a bit complicated. You can modify client’s docker.sh to add a -u in docker run so client can access container environment as “nvidia” user.
You will also need to change client folder’s ownership to match with the UID so it can be accessed by client. You can do this with chown command.