Hopefully it will be helpful for anyone has the same issue as me. Whatever files beyond this scope will be stored in the local disk during the lifetime of the pod.įor this signature db file, given the size is relatively small and the nature that it is only for the duration of a single session, I think it should be fine to just store it in the local disk, instead of the postgres database. Note: By default, in the deployment.yaml in the helm package, only the files under /home and /share directories are stored via PVC, which is NFS in my case. Update below command in both /etc/jupyter/jupyter_notebook_config.py and /home/jovyan/.jupyter/jupyter_notebook_config.py in the docker imageĬ.NotebookNotary.data_dir = “/tmp/signature_dir” This can be done by modifying the configuration files inside of the jhub image. The other way, which is the workaround I am using, is to relocate the nbsignature.db file to your k8s cluster local disk. Our PostgreSQL tutorial provides basic and advanced concepts of PostgreSQL. One way is to replace the database from sqlite to postgre for the singleuser notebook but I haven’t figured it out how to do that (btw, you can point the hub database to postgres, which is suggested by the official doc, by adding to hub.db.type and hub.db.url.). PostgreSQL is a popular relational database management system (RDBMS). The issue is caused by the sqlite db is not compatible with NFS drive. If you get this implemented, you should check in with the nbformat maintainers to see if your implementation could be contributed back to the community.Īctually I found a workaround for this issue. Mongo gives you no schema which is not always good. For your requirement, I prefer Postgres (or MySQL) over MongoDB. Classes that require some variation on the CRUD basics would just override those methods as necessary or have the base “ask” each class to provide “its” appropriate SQL command, etc. Postgres and MySQL are very similar, but Mongo has differences in terms of storage type and the CAP theorem. Then, your PG or MySQL implementation would derive from that SQL base class. Instead, a helpful and simple refactoring would be to introduce a SQL base class that contains the CRUD operations, leaving the subclasses to implement essentially just the initialization logic. The issue with doing something like that is in case there are any checks like isinstance(store_factory, SQLiteSignatureStore) (which is arguably a bug) the code may act upon your implementation in an incompatible way. It seems like you could derive much of the implementation from SQLiteSignatureStore since SQL is, well, fairly standard. I don’t know if such an implementation exists. You would then configure c.NotebookNotary.store_factory to point at this class. To introduce a different signature store, it looks like you’d need to provide an implementation of a SignatureStore class that can initialize and operate against a PG or MySQL DB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |