Accessing paid persistent disk in spaces
Hello Everyone,I have a space with persistent disk running Python. I need to save some data to this disk, but I can’t seem to locate the standard/datadirectory. Do I need to use a specific API to interact with the/datadirectory on the Space?
2024-05-22T00:26:46Z
hi@mukhtar, just to confirm are you trying to  access/dataat Docker runtime or buildtime?/datais only available after your Space is launched, i.e. at runtime.
2024-05-22T12:58:36Z
hello@radames, Thank you for your response. To clarify, I am trying to access the /data directory at runtime. I have a Streamlit app that collects data from the user (in JSON format) and I want to permanently save this data. I attempted to directly write to /data , but the data is lost when the Space is restarted. Additionally, when I printed the available paths from the home directory, there was no /data directory listed.
2024-05-24T04:01:15Z
Could you please try detaching and reattaching the storage device, followed by a factory reset?