question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] OSError: [Errno 30] Read-only file system: '/app'

See original GitHub issue

Thank you for submitting an issue. Please refer to our issue policy for additional information about bug reports. For help with debugging your code, please refer to Stack Overflow.

Please fill in this bug report template to ensure a timely and thorough response.

Willingness to contribute

The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?

  • Yes. I can contribute a fix for this bug independently.
  • Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
  • No. I cannot contribute a bug fix at this time.

System information

  • Have I written custom code (as opposed to using a stock example script provided in MLflow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS 12.3.1
  • MLflow installed from (source or binary): binary
  • MLflow version (run mlflow --version): 1.12.1
  • Python version: 3.8
  • npm version, if running the dev UI:
  • Exact command to reproduce:

Describe the problem

When trying to log the mlflow pyfunc model to mlflow tracking server, it is giving an error as mentioned in title. Expected behaviour is that no error should come.

Code to reproduce issue

import mlflow
import os

#removed below params due to confidentiality

os.environ['MLFLOW_S3_ENDPOINT_URL'] = ""
os.environ['AWS_ACCESS_KEY_ID'] = ""
os.environ['AWS_SECRET_ACCESS_KEY'] = ""
mlflow.set_tracking_uri("")
mlflow.set_registry_uri("")

class AwesomeModel(mlflow.pyfunc.PythonModel):
    def load_context(self, context):
        pass
    def predict(self,context,inp_df):
        return 5

with mlflow.start_run() as run:
    mlflow.pyfunc.log_model(
                        python_model=AwesomeModel(),
                        artifact_path="ml-storage",
                        artifacts=None,
                        registered_model_name="ml_serving_demo_model")

Other info / logs

Traceback (most recent call last):
  File "prob.py", line 19, in <module>
    mlflow.pyfunc.log_model(
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/pyfunc/__init__.py", line 993, in log_model
    return Model.log(
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/models/model.py", line 173, in log
    mlflow.tracking.fluent.log_artifacts(local_path, artifact_path)
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/fluent.py", line 557, in log_artifacts
    MlflowClient().log_artifacts(run_id, local_dir, artifact_path)
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/client.py", line 911, in log_artifacts
    self._tracking_client.log_artifacts(run_id, local_dir, artifact_path)
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/tracking/_tracking_service/client.py", line 287, in log_artifacts
    self._get_artifact_repo(run_id).log_artifacts(local_dir, artifact_path)
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/store/artifact/local_artifact_repo.py", line 57, in log_artifacts
    mkdir(artifact_dir)
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/utils/file_utils.py", line 112, in mkdir
    raise e
  File "/opt/anaconda3/envs/env38/lib/python3.8/site-packages/mlflow/utils/file_utils.py", line 109, in mkdir
    os.makedirs(target)
  File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 1 more time]
  File "/opt/anaconda3/envs/env38/lib/python3.8/os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/app'

What component(s), interfaces, languages, and integrations does this bug affect?

Components

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow’s components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
tejal567commented, Apr 12, 2022

Got it. I think this is not a bug in mlflow then. I am closing this issue. Thank you for your help @harupy . Much appreciated.

0reactions
harupycommented, Apr 12, 2022

@tejal567 Glad to help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OSError: [Errno 30] Read-only file system: '/User'. macOS ...
It seems to me that the actual problem was that your file system was mounted read-only (as mentioned in the error message) and...
Read more >
How to solve OSError: [Errno 30] Read-only file system?
It's because of OS privilege. Admin have not given you access to write to that directory. So, You can only read (Read Access)...
Read more >
Getting OSError: [Errno 30] Read-only file system
I am new to AzureML, I am trying to run the pipeline using parallelRunSteps and pipeline is getting submitted successfully but while running ......
Read more >
OSError: [Errno 30] Read-only file system - Odoo
Hello, I just finish to install community version (14) on mac OSX. And when i try to use scaffold command to create module...
Read more >
[Errno 30] Read-only file system: '/static' on MacOS+Visual ...
OSError : [Errno 30] Read-only file system: '/static' on MacOS+Visual Code · Is the directory set to read-only? What are the permissions? ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found