Reading file in host from quantrocket


I need to read a file from the host machine.

For example:

import pandas as pd

But that ‘/mnt/efs/fs1/data/myfile.csv’ is in my host machine, not inside my Docker container.

Is there a easy way to do that?


After putting

  • ‘/mnt/efs/fs1:/codeload/fs1:ro’
    inside the .yaml file inside the codeload service I can see my efs host directory from inside my codeload container.

But I am still not able to read it from my python script with pandas read_csv function:

msg: ‘error running function: File b’’/codeload/fs1/data/…/myfile.csv’’
does not exist’
status: error

I can not see the content of the fs1 directory in the Launcher navigator either.


That’s the right idea but define the bind mount under one or more of the jupyter, satellite, moonshot, or zipline services, depending where your code is running, as those are the services where user code can run. No user code runs in the codeload service.