服务器docker环境下导入时报错:PermissionError
Created by: zhou-wj
nvidia-docker run指定--user为当前用户时,导入paddle时报错如下:
import paddle Traceback (most recent call last): File "", line 1, in File "/usr/local/python3/lib/python3.6/site-packages/paddle/init.py", line 25, in import paddle.dataset File "/usr/local/python3/lib/python3.6/site-packages/paddle/dataset/init.py", line 18, in import paddle.dataset.mnist File "/usr/local/python3/lib/python3.6/site-packages/paddle/dataset/mnist.py", line 23, in import paddle.dataset.common File "/usr/local/python3/lib/python3.6/site-packages/paddle/dataset/common.py", line 55, in must_mkdirs(DATA_HOME) File "/usr/local/python3/lib/python3.6/site-packages/paddle/dataset/common.py", line 48, in must_mkdirs os.makedirs(DATA_HOME) File "/usr/local/python3/lib/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/usr/local/python3/lib/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/usr/local/python3/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/.cache'
当指定--user为root时,导入paddle正常,可是在服务器上没有root权限...... 为什么导入paddle需要root权限?请问有什么解决方法吗?