-
Notifications
You must be signed in to change notification settings - Fork 53
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
Shared filesystem caching #272
Conversation
|
||
set -euxo pipefail | ||
|
||
huggingface-cli download --local-dir $MODEL_DIR $MODEL_REPO |
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 a follow up, we may need to do some smarter logic that ensures only required files get downloaded. For example, some repos have both safetensors and pytorch. I can tackle this.
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.
#274 Added
06873fc
to
e0ac7a2
Compare
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.
Great work! I have not had the time to review everything but first impression is great! 💪
I want to give it another 👁️ tomorrow but don't feel blocked by me.
}, | ||
}); err != nil { | ||
if !apierrors.IsNotFound(err) { | ||
return fmt.Errorf("deleting job %q: %w", jobName, err) |
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.
personal preference: Good scenario for errors.Join()
if there is a chance that any of the next deletes could succeed.
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.
I cant think of many scenarios where a subsequent delete might succeed, I am going to leave as-is and allow exp-backoff of the Reconciler to take effect on this.
@alpe Thanks for the review! |
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.
Added some more nits and comments.
I had no chance to try it but utack
Image: c.Image, | ||
Args: args, | ||
Env: env, | ||
Resources: corev1.ResourceRequirements{ |
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.
You are not setting the SecurityContext: r.ModelServerPods.ModelContainerSecurityContext
here, like on the other engines. Is there a reason for this?
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.
Filed #278
// ollama run nomic-embed-text hey | ||
// Error: "nomic-embed-text" does not support generate | ||
// | ||
startupProbeScript += fmt.Sprintf(" && /bin/ollama run %s hi", m.Name) |
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.
I assume the purpose of this call is to verify the model is downloaded.
There is a simpler way to achieve the same:
./ollama show nomic-embed-text --modelfile
will return quicker with some metadata or fail with an error code when the server is not running or the model not available.
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.
Filed #277 to track to avoid scope creep
@alpe Really appreciate the in-depth review. I addressed most comments and opened issues for others. |
hf://
urls.Scope creep:
Followup later (Issues submitted):