Running with docker - /data permission denied

#10
by entityinarray - opened
PS C:\Users\entityinarray\Docker\facepoke> docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all -e DATA_ROOT="/data" registry.hf.space/jbilcke-hf-facepoke:latest

==========
== CUDA ==
==========

CUDA Version 12.4.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

2024-10-12 17:18:33,763 - loader - INFO - πŸš€ Setting up storage directories...
Traceback (most recent call last):
  File "/home/user/app/app.py", line 43, in <module>
    from loader import initialize_models
  File "/home/user/app/loader.py", line 164, in <module>
    create_directory(MODELS_DIR)
  File "/home/user/app/loader.py", line 63, in create_directory
    os.makedirs(directory)
  File "/usr/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/data'

Hi, you can use any other path in DATA_ROOT, as long as the directory exists, eg "C:\Users\entityinarray\Docker\facepoke\data" (or "/Users/entityinarray/Docker/facepoke/data" I'm now sure how paths work in the windows shell)

The purpose of this path is that it will be used to store models.

jbilcke-hf changed discussion status to closed

Sign up or log in to comment