Skip to content

[Question]: docker --read-only运行镜像时报错:OSError: [Errno 30] Read-only file system: '/root/.paddlenlp' #10503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
GYQ2017 opened this issue Apr 26, 2025 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@GYQ2017
Copy link

GYQ2017 commented Apr 26, 2025

请提出你的问题

任务类型:关系抽取任务 paddlenlp==3.0.0b4 paddlepaddle-gpu=3.0.0(cu126)
打了镜像,docker运行时docker run --read-only --gpus all报错

@GYQ2017 GYQ2017 added the question Further information is requested label Apr 26, 2025
@GYQ2017
Copy link
Author

GYQ2017 commented Apr 26, 2025

详细报错如下:

File "/example/infer_task1.py", line 2, in <module>
    from paddlenlp import Taskflow
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/__init__.py", line 46, in <module>
    from . import (
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/data/__init__.py", line 18, in <module>
    from .data_collator import *
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/data/data_collator.py", line 26, in <module>
    from ..transformers import BertTokenizer
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/transformers/__init__.py", line 16, in <module>
    from .configuration_utils import PretrainedConfig
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/transformers/configuration_utils.py", line 38, in <module>
    from ..utils import CONFIG_NAME, LEGACY_CONFIG_NAME
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/utils/__init__.py", line 20, in <module>
    from .env import CONFIG_NAME, GENERATION_CONFIG_NAME, LEGACY_CONFIG_NAME
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/utils/env.py", line 67, in <module>
    MODEL_HOME = _get_sub_home("models")
  File "/usr/local/lib/python3.10/site-packages/paddlenlp/utils/env.py", line 51, in _get_sub_home
    os.makedirs(home, exist_ok=True)
  File "/usr/local/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/local/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/root/.paddlenlp'

@ZHUI
Copy link
Collaborator

ZHUI commented Apr 27, 2025

paddlenlp 本地会建立一些 缓存目录,--read-only 导致 报错的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants