laminlabs / lamindb

A data framework for biology.
https://docs.lamin.ai
Apache License 2.0
123 stars 9 forks source link

How to correctly call an S3 instance from another server? #1936

Open Kang-chen opened 1 week ago

Kang-chen commented 1 week ago

Usage question

I've successfully uploaded my instance to an S3 server. Could you please guide me on how to correctly call and access this instance from a different server?

Koncopd commented 1 week ago

Hi, @Kang-chen , could you elaborate please how you created your instance? Because normally they are atomically synchronized.

Kang-chen commented 5 days ago

I apologize for the lack of response.

I am attempting to access the database from another server node that I have created. However, I have encountered issues while trying two different methods:

  1. lamin load: I received the following warning: "WARNING:root DATABASE URL environment variable set, and so no databases setup." image

  2. lamin init: I faced the following error: django.db.utils.DatabaseError: database disk image is malformed.

The instance has been successfully uploaded to my S3 server.

I would appreciate any guidance or suggestions on resolving these issues.

Koncopd commented 3 days ago

Yes, the problem is that you created a local instance. Unfortunately it is not possible to access this instance on another machine. To be able to access an instance on another machine, you need to create a cloud instance with an aws s3 bucket used for storage. It is done like this lamin init --storage s3://your-bucket-name/your-instance-folder --name your-instance-name --schema bionty note that you need to install lamindb with aws extra for this to work pip install lamindb[aws,bionty] You also need your bucket and aws credentials properly configured.