Skip to content

Conversation

@doringeman
Copy link
Contributor

Allow rebuilding the routers with new allowed origins for CORS.

return m
}

func (m *Manager) RebuildRoutes(allowedOrigins []string) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like something that should happen behind a lock, or is the consumer of this API supposed to lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, added a lock in 784d6df (compare the force push changes).

@doringeman doringeman force-pushed the rebuild-routes-cors branch from 7eeb62e to 784d6df Compare June 10, 2025 14:27
maximumConcurrentModelPulls = 2
)

var lock sync.Mutex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make it a member of Manager?

@doringeman doringeman force-pushed the rebuild-routes-cors branch from 784d6df to 60166a9 Compare June 10, 2025 14:32
@doringeman doringeman merged commit 8c7c640 into docker:main Jun 10, 2025
1 check passed
ericcurtin referenced this pull request in ericcurtin/model-runner Sep 21, 2025
* Enable SmolLM 3 template.
- Add `replace` method for string type and update unit tests.
- Support slice expression with omitted start or end index and update unit tests.
- Fix the bug that `in` operator does not work for string type.
- Update testing script to support fetching `chat-template.jinja` when the template is not in `tokenizer_config.json`.

Test passed with SmolLM 3B model:
https://huggingface.co/HuggingFaceTB/SmolLM3-3B

* Update test cases of string replace.

---------

Co-authored-by: Olivier Chafik <[email protected]>
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 23, 2025
* Provides API for packaging models

- introduces builder package for building artifacts
- extracts registry packge for direct interaction with OCI registries

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

* slim down artifact interface

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

---------

Signed-off-by: Emily Casey <[email protected]>
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 23, 2025
* Provides API for packaging models

- introduces builder package for building artifacts
- extracts registry packge for direct interaction with OCI registries

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

* slim down artifact interface

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

---------

Signed-off-by: Emily Casey <[email protected]>
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 24, 2025
* Provides API for packaging models

- introduces builder package for building artifacts
- extracts registry packge for direct interaction with OCI registries

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

* slim down artifact interface

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

---------

Signed-off-by: Emily Casey <[email protected]>
doringeman pushed a commit to doringeman/model-runner that referenced this pull request Sep 24, 2025
* Provides API for packaging models

- introduces builder package for building artifacts
- extracts registry packge for direct interaction with OCI registries

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

* slim down artifact interface

Signed-off-by: Emily Casey <[email protected]>

* cleanup

Signed-off-by: Emily Casey <[email protected]>

---------

Signed-off-by: Emily Casey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants