Chat UI not working with persistent storage

#4
by gabrielmbmb HF staff - opened

Hi @nsarrazin ,

when adding a persistent storage to the space generated by this template, the space errors with Runtime Error. This is because when Mongo tries to start, it shutdowns because the /data/db directory doesn't exist:

{"t":{"$date":"2023-12-29T11:19:18.128+01:00"},"s":"E", "c":"CONTROL", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}}

I've seen that the /data/db directory is created in the Dockerfile and this works when not using the persistent storage. When using the persistent storage, my guess is that a Docker volume is mounted in the /data directory of the container, replacing all the files and directories with the files and directories of the volume, which initially is empty.

This has been confirmed to be working on https://huggingface.co/spaces/argilla/notux-chat-ui and creating a new space using the template (both with and without persistent storage)

Closing the issue as the PR was merged.

gabrielmbmb changed discussion status to closed

Sign up or log in to comment