Skip to content

PermissionError: [Errno 13] Permission denied: '/opt/app-root/lib/python3.9/site-packages/langkit/langkit_data' #322

@pradeepdev-1995

Description

@pradeepdev-1995

Getting the below error in Ubuntu server after deployment.

from langkit import llm_metrics,extract,injections,toxicity
  File "/opt/app-root/lib/python3.9/site-packages/langkit/injections.py", line 95, in <module>
    init()
  File "/opt/app-root/lib/python3.9/site-packages/langkit/injections.py", line 36, in init
    embeddings_path = os.path.join(_get_data_home(), path)
  File "/opt/app-root/lib/python3.9/site-packages/langkit/utils.py", line 27, in _get_data_home
    os.makedirs(data_path)
  File "/usr/lib64/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/app-root/lib/python3.9/site-packages/langkit/langkit_data

But this is working fine on my local Ubuntu machine. The deployment, however, is Docker-based.

From where can I download the Langkit data directly?

Once I download the data, I can place it in the root directory of the Dockerfile itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions