Description
Hi, looking for any way how to deploy weaviate with django BE on internet. So far trying Railway service (https://railway.app/), but at this moment without much success.
All the things, django BE + Weaviate, works good on my local machine.
At the end I do not care that much about exact service provider, just looking for any functional and potencially easy to expand solution. BE can be on Railway and Weaviate on some other platform or any other combination or usage of diferent platform for deployment
Todos:
A) connect img2vec to weaviate
B) connect weaviate to django BE
A) connect img2vec to weaviate
with help chatGPT I create small github repo, to be albe deploy img2vec on Railway. It has basicly two files:
Dockerfile
FROM cr.weaviate.io/semitechnologies/img2vec-pytorch:resnet50
railway.toml
[build]
builder = "DOCKERFILE"
dockerfilePath = "Dockerfile"
[deploy]
startCommand = "python -m http.server 8080"
I was trying to setup public domain, because the internal does not work
https://art-db-img2vec-production.up.railway.app/
Port 8080
But the Railway service for Weaviate have in logs
img2vec-neural inference service not ready
the env variable in Weaviate service for IMAGE_INFERENCE_API
is art-db-img2vec-production.up.railway.app:8080
B) connect weaviate to django BE
idealy keep the current v4 client, could be done with this, so far I did not make functional. First may need to resolve point A
- How to support both grpc and http for a railway service? - Railway Help Station
One thing which is not clear to me is
auth_credentials=AuthApiKey(os.getenv("WEAVIATE_API_KEY")),
in
client = weaviate.connect_to_custom(
http_host=os.getenv("WEAVIATE_URL"), # URL only, no http prefix
http_port=443,
http_secure=True, # Set to True if https
grpc_host=os.getenv("WEAVIATE_GPC_URL"),
grpc_port=443, # Default is 50051, WCD uses 443
grpc_secure=True, # Edit as needed
auth_credentials=AuthApiKey(os.getenv("WEAVIATE_API_KEY")),
)
is this value mandatory?
one of the env varaibles in weaviate is
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
what comes to my mind:
- rent some server and run all there (just do not have much experience with this)
- use the Railway template and figure out how to connect all the services together. This may need create service for img2vec and connect to Weavieate service. Plus connect Weavite to djange BE
related posts:
- Client V4 not instantiating with Railway template - several ports not supported (using v3 client)
- How to support both grpc and http for a railway service? - Railway Help Station
- connect all these things in some other way, based on chatgpt or Claude instruction for example
- try to setup whole BE in one Railway service
Server Setup Information
- Weaviate Server Version: http://cr.weaviate.io/semitechnologies/weaviate:1.24.7
- Deployment Method: railway template and docker for img2vec
- Multi Node? Number of Running Nodes: one node for Weaviate and one for img2vec-neural
- Client Language and Version: python, v4
- Multitenancy?: not sure, probably no?
Any additional Information
I am acctually not sure where to ask for help, it could be more related to Railway. I will keep trying to find solution on my own