Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: define WEIGHTS disk location in only one place so it can be user-customized #242

Open
julien-c opened this issue Apr 27, 2023 · 2 comments

Comments

@julien-c
Copy link

julien-c commented Apr 27, 2023

(for people who want to run outside of Docker for instance)

@snxraven
Copy link
Contributor

snxraven commented Apr 27, 2023

You can customize this location during the docker run command.

This is the default command provided which uses docker volumes:

docker run -d \
         -v weights:/usr/src/app/weights -v datadb:/data/db/ \
         -p 8008:8008 ghcr.io/nsarrazin/serge:latest

This can be changed to use a local directory like so:

docker run -d \
         -v /path/to/weights/on/host/:/usr/src/app/weights -v datadb:/data/db/ \
         -p 8008:8008 ghcr.io/nsarrazin/serge:latest

@nsarrazin
Copy link
Member

I do think there's a few things that need to be made into optional environment variables indeed, I heard a similar request regarding the redis server, from people who already have an instance running and don't want to run an instance specifically for serge.

So I will try to make things a bit more customizable. (location of weights, location of the redis snapshot to disk, network address of the redis server)

This should be fairly easy to setup with the BaseSettings class from pydantic. There's already a few pieces in place in api/src/serge/models/settings.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants