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

See original GitHub issue

Willingness to contribute

Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.

MLflow version

1.27.0

System information

NAME=“Ubuntu” VERSION=“20.04.4 LTS (Focal Fossa)” as underlying OS

Running Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1 docker-compose version 1.25.0

FROM python:3-slim
ARG MLFLOW_VERSION=1.27.0

WORKDIR /mlflow/

COPY ./requirements.txt ./requirements.txt

RUN pip install -r requirements.txt

EXPOSE 5000

CMD mlflow server --backend-store-uri ${BACKEND_URI} --default-artifact-root ${ARTIFACT_ROOT} \ 
    --host 0.0.0.0 --port 5000 
version: '3'

services:
  mlflow:
    image: 'atcommons/mlflow-server'
    build: .
    ports:
      - "8080:5000"
    volumes:
      - ./data:/mlflow
      - ./data/mlartifacts:/mlflow/mlartifacts:rw
    environment:
      BACKEND_URI: sqlite:////mlflow/mlflow.db
      ARTIFACT_ROOT: /mlflow/mlartifacts

requirements.txt:

mlflow==1.27.0 psycopg2-binary boto3

Describe the problem

If I try to log an experiment and add artifacts using the following:

import uuid
import mlflow
model = onnx.load(f'{path}/model.onnx')
mlflow.set_experiment(uuid.uuid4().hex)

with mlflow.start_run(run_name=name):
    mlflow.get_artifact_uri()
    mlflow.log_artifact(f'{path}/MLmodel', artifact_path=name)
    mlflow.log_artifact(f'{path}/config.yml', artifact_path=name)
    mlflow.log_artifact(f'{path}/conda.yaml', artifact_path=name)
    mlflow.log_artifact(f'{path}/model_config.yaml', artifact_path=name)
    mlflow.log_artifact(f'{path}/processing.py', artifact_path=name)
    mlflow.onnx.log_model(model, artifact_path=name)

I get the error: OSError: [Errno 30] Read-only file system: '/mlflow'

If I ssh into the container I can go to the mounted file that is at /mlflow/mlartifacts and create a file manually, exit the container and see the file on the local system all without issue.

Tracking information

No response

Code to reproduce issue

see Describe the problem above

Other info / logs

No response

What component(s) does this bug affect?

  • 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/pipelines: Pipelines, Pipeline APIs, Pipeline configs, Pipeline Templates
  • 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

What interface(s) does this bug affect?

  • 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

What language(s) does this bug affect?

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

What integration(s) does this bug affect?

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
harupycommented, Jul 19, 2022

Looks like it’s truncated. Do you have the ... part?

0reactions
harupycommented, Jul 26, 2022

@zstern If you want to log artifacts in the tracking server, you need to run mlflow server with --serve-artifacts and --artifacts-destination. This example might help. Feel free to reopen the issue if you need further help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Error "Read-only file system" in AWS Lambda when ...
Only /tmp seems to be writable in AWS Lambda. Therefore this would work: filepath = '/tmp/' + key. References:.
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 >
[Errno 30] Read-only file system when running inside AWS ...
When attempting to run soda-sql in a Python AWS Lambda I'm experiencing an error when instantiating ScanBuilder. To Reproduce Steps to reproduce the...
Read more >
Pip OSError: [Errno 30] Read-only file system - NixOS Discourse
I'm running NixOS unstable, and I get [Errno 30] Read-only file system errors whenever I try to use pip. Here's a minimal example....
Read more >
“Failure Exception: OSError: [Errno 30] Read-only file system ...
Issue I am trying prepare and then submit a new experiment to Azure Machine Learning from an Azure Function in Python.
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