How to mount dataset or datalake with read/write permission in Notebook of Azure Machine Learning Studio?

Milad Resketi 10 Reputation points
2023-03-15T22:26:15.2333333+00:00

I've successfully mounted a dataset with read permission to notebook of my machine learning studio account.

But when I try to write back to the datalake/dataset, it throughs "[Errno 30] Read-only file system".

How can I mount the dataset with write permission?


from azureml.core import Workspace, Dataset, Datastore

import tempfile

from azureml.dataprep.fuse.dprepfuse import MountOptions

mount_options = MountOptions(default_permission=0o777)

mounted_path = tempfile.mkdtemp()  

subscription_id = '**********************'

resource_group = '**********************'

workspace_name = '**********************'

  

workspace = Workspace(subscription_id, resource_group, workspace_name)

  

datastore = Datastore.get(workspace, "my_datalake")

dataset = Dataset.File.from_files(path=(datastore, 'ml/folder1/folder2/'))

mount_context = dataset.mount(mounted_path, mount_options=mount_options)

mount_context.start()

print(mounted_path)

import os

os.mkdir(f"{mounted_path}/newfolder", )

OSError                                   Traceback (most recent call last)

Cell In[2], line 22

 18 print(mounted_path)

 20 import os

---> 22 os.mkdir(f"{mounted_path}/john", )

 24 # refer to this

 25 # https://learn.microsoft.com/en-us/answers/questions/884340/read-only-file-system-error-in-azureml-studio

 26 # https://learn.microsoft.com/en-us/answers/questions/67126/failure-exception-oserror-(errno-30)-read-only-fil

 27 

 28 # az ml datastore attach-blob --account-name cgrpdatalakepoc --container-name filesystempoc --name ds_datalake_poc

OSError: [Errno 30] Read-only file system: '/tmp/tmpfyqld99p/newfolder'

ame: azureml_py38

channels:

  - conda-forge

  - anaconda

  - defaults

dependencies:

  -...

 
Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,499 questions
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,006 questions
{count} votes

1 answer

Sort by: Most helpful
  1. OPERTI Felipe 0 Reputation points
    2024-05-15T09:41:00.78+00:00

    Are there any answer related with this?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.