-
Notifications
You must be signed in to change notification settings - Fork 557
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
when and where is the best way to download the model weights? #1426
Comments
This is exactly my question. I've read all through the docs and examples, and I'm really surprised this isn't dealt with more clearly. In the docs it warns against doing this in
How? I know how I'd do this if I was doing the Dockerfile myself, but the point of cog seems to be that I offload this process to the tool itself. Then in the Resnet example, there seems to be some magic happening with the file How and where should one do this? Can the docs be updated to give more explicit guidance? |
I really like the idea of Replicate, but I rarely be able to find any support of this company. It’s great for prototyping, but I would not recommend for production. |
Attempting to answer my own question, it appears that So I guess I need to download my model and put it beside (or below) my code and it should "Just Work." This is cool, but opaque and not well documented. It would be great to showcase this as a feature in the docs. |
Oh wow, it seems like these weights will be re-uploaded each time. Is it the same for you? |
I haven't tried this yet, still reading. But I would assume Docker will cache this layer and re-use on subsequent pushes. |
Hey @ynie and @humphd. Sorry for the delay getting an answer to you here. This is definitely something that should be better documented. A common approach for downloading weights is to create a standalone script (typically cog run script/download_weights
cog predict ...
cog push ... Cog will include any files that are present in the project directory (and subdirectories) in the compiled Docker image, unless they are explicity ignored patterns in your I know the @replicate/models team has also been using build:
run:
- curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/download/v0.3.1/pget" && chmod +x /usr/local/bin/pget
predict: "predict.py:Predictor" |
Thanks for confirming how this works, @zeke. Appreciated. |
We want the model be part of the docker image, but we are struggle to find a place to run the python command to download them. Where can we do it in the cog.yaml file? Thanks!
The text was updated successfully, but these errors were encountered: