-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add context support for parallel inference (#12)
* feat: enhance model loading with context support - Updated `load_model` method in `UserModel` and `NubisonModel` to accept a `ModelContext` argument, allowing for better handling of worker-specific information during model loading. - Introduced `ModelContext` type definition to encapsulate worker index and total number of workers for GPU initialization in parallel setups. - Adjusted related code in service and tests to accommodate the new context parameter. - Updated documentation in `README.md` to reflect changes in the `load_model` method and its parameters. * feat: update Dockerfile to support parallel inference - Added Open Container Initiative (OCI) labels for better image description and source tracking. - Introduced a new environment variable `NUM_WORKERS` with a default value of 4 to configure the number of workers for the application. * refactor: reduce default worker count for improved resource management - Updated the Dockerfile to change the `NUM_WORKERS` environment variable from 4 to 2, optimizing resource allocation. - Adjusted the default number of workers in `Service.py` from 4 to 1 to align with the new Docker configuration, enhancing performance and efficiency during model loading.
- Loading branch information
1 parent
9b25ba4
commit 8f73ebb
Showing
9 changed files
with
179 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.