Spaces:
Runtime error
Chat UI not working with persistent storage
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.
I've created a PR to solve this issue:
https://huggingface.co/spaces/huggingchat/chat-ui-template/discussions/5
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.