-
Notifications
You must be signed in to change notification settings - Fork 616
Modify internal base image struct #1712
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
Conversation
To improve model startup performance, we are providing a set of pre-built image based based on a combination of python, pytorch and CUDA versions. The current version stores all the versions as a flat list and it makes a bit hard to reason about combinations and provide user with feedback on what versions are available. The change here makes Python the top level key and store all the CUDA and PyTorch versions availab 8000 le for each Python version. It would be possible to normalize the struct more to represent the relationship between CUDA, Python but PyTorch but I don't know if that's worth doing at this point. The work here is WIP but sharing it for feedback. Signed-off-by: Marcus Martins <marcus@replicate.com>
Signed-off-by: Marcus Martins <marcus@replicate.com>
Signed-off-by: Marcus Martins <marcus@replicate.com>
Signed-off-by: Marcus Martins <marcus@replicate.com>
dd19205
to
53d2724
Compare
* Base images are now derived from the Torch compatibility matrix * Only include versions greater or equal to minimums * Patch versions are stripped Signed-off-by: andreasjansson <andreas@replicate.ai>
05a4506
to
22d179a
Compare
pkg/cli/baseimage.go
Outdated
func newVersionsMatrix() *cobra.Command { | ||
var cmd = &cobra.Command{ | ||
Use: "generate-versions", | ||
Short: "Generate a nested matrix of python, cuda, pytorch versions (json)", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
versions := dockerfile.BaseImageConfigurations() | ||
output, err := json.Marshal(versions) | ||
if err != nil { | ||
return err | ||
} | ||
fmt.Println(string(output)) | ||
return nil | ||
}, | ||
Args: cobra.MaximumNArgs(0), | ||
} | ||
return cmd | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this new command and the existing generate-matrix
command implemented below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, generate-versions
was an unused duplicate, so I removed it with 6d6d54c
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Signed-off-by: Mattt <mattt@replicate.com>
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Signed-off-by: andreasjansson <andreas@replicate.ai>
* Modify base image struct To improve model startup performance, we are providing a set of pre-built image based based on a combination of python, pytorch and CUDA versions. The current version stores all the versions as a flat list and it makes a bit hard to reason about combinations and provide user with feedback on what versions are available. The change here makes Python the top level key and store all the CUDA and PyTorch versions available for each Python version. It would be possible to normalize the struct more to represent the relationship between CUDA, Python but PyTorch but I don't know if that's worth doing at this point. The work here is WIP but sharing it for feedback. Signed-off-by: Marcus Martins <marcus@replicate.com> * Fix ordering Signed-off-by: Marcus Martins <marcus@replicate.com> * Fix the matrix-generation command Signed-off-by: Marcus Martins <marcus@replicate.com> * Generate versions matrix Signed-off-by: Marcus Martins <marcus@replicate.com> * Smaller set of base image combinations with aggressive minimums * Base images are now derived from the Torch compatibility matrix * Only include versions greater or equal to minimums * Patch versions are stripped Signed-off-by: andreasjansson <andreas@replicate.ai> * Remove duplicate / unused generate-versions function Signed-off-by: Mattt Zmuda <mattt@replicate.com> * Update compatibility matrix Signed-off-by: Mattt Zmuda <mattt@replicate.com> * Support non-Torch and non-Torch images Signed-off-by: andreasjansson <andreas@replicate.ai> --------- Signed-off-by: Marcus Martins <marcus@replicate.com> Signed-off-by: andreasjansson <andreas@replicate.ai> Signed-off-by: Mattt Zmuda <mattt@replicate.com> Signed-off-by: Mattt <mattt@replicate.com> Co-authored-by: andreasjansson <andreas@replicate.ai> Co-authored-by: Mattt Zmuda <mattt@replicate.com>
Modify the internal structure on how we store our base image compatibility matrix.