autogen-studio-dockerfile
autogen-studio-dockerfile copied to clipboard
Persisting Data
This is more of an FYI. I couldn't come up with a better way to do this but maybe you can if you do future iterations.
It looks like the database at /usr/local/lib/python3.10/site-packages/autogenstudio/web/database.sqlite is storing the application information.
To be able to persist the data between container instances, i first extract a copy of the file by mounting a volume like such
/home/server/autogen-studio/sample:/usr/local/lib/python3.10/site-packages/autogenstudio/web/sample
I copy the database.sqlite at /usr/local/lib/python3.10/site-packages/autogenstudio/web/database.sqlite to the sample folder from within the container which makes the file available outside of the container.
I destroy the stack/container and run again but use the following mount as my volume
/home/server/autogen-studio/database.sqlite:/usr/local/lib/python3.10/site-packages/autogenstudio/web/database.sqlite
This was the compose file I used.
version: "3"
services:
autogen-studio:
image: autogen-studio:latest
container_name: autogen-studio
volumes:
- /home/server/autogen-studio/database.sqlite:/usr/local/lib/python3.10/site-packages/autogenstudio/web/database.sqlite
#- /home/server/autogen-studio/sample:/usr/local/lib/python3.10/site-packages/autogenstudio/web/sample
ports:
- 38081:8081
Thanks for the repo! It helped get me going.
I'm having the same issue, did you find a solution ? autogen-studio should have a config or a ENV variable to specify the path of database.sqlite