lm-sys / RouteLLM

A framework for serving and evaluating LLM routers - save LLM costs without compromising quality!
Apache License 2.0
2.78k stars 204 forks source link

Docker support #18

Closed raldone01 closed 1 month ago

raldone01 commented 1 month ago

This commit adds a simple workflow to publish docker images to ghcr.io.

Currently it runs the python script with root. It would be better to run as some other user like 33:33. A simple docker-compose.yml is also provided.

In docker it is customary to run services in different containers. I run ollama in a container under the url http://ollama. I found no way to specify fully custom base urls without modifying the python script or using the sdk.

It builds all images and seems to work. I don't have the best insight in the code base so please test it.

iojw commented 1 month ago

Thanks for this PR! Could you share more about your use case and when this is needed?

raldone01 commented 1 month ago

I am not sure what exactly you are asking for.

Regarding docker

I am sure there are some good blogs about the advantage of docker out on the internet. I will break down the key points:

The following is a separate issue and I will open one soon.

Regarding the custom base url:

Basically I have ollama running on a different machine under some domain like ollama.custom.com and would like to pass the base uri to the router.

iojw commented 1 month ago

Thank you for elaborating! I definitely understand the advantages of using Docker and I think it's great that you're using it. However, I don't think it makes sense to publish a universal Docker image for RouteLLM right now since the specific requirements (drivers, deps, version, base image etc.) will differ based on each user's needs.

The fact that routellm can be installed from PyPI makes it very easy for anyone to build a Docker image that suits their own needs. I hope this makes sense, let me know if you have any other thoughts.

raldone01 commented 1 month ago

Makes sense. I will just create a routllm-docker repo and build and host it from there.