Create modelrepotest.mdx#696
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
@Promptless add this as step one in the doc: Install Go (and the command is: brew install go) |
|
Done — added Install Go ( |
| export RUNPOD_GRAPHQL_URL="https://api.runpod.io/graphql" | ||
| export RUNPOD_API_KEY="your-api-key" # replace with your actual API key | ||
|
|
||
| export MODEL_NAME="$(whoami)-test-$(date +%s)" # unique name per test run — reusing the same name uploads a new version, not a new model |
There was a problem hiding this comment.
This can probably be changed to:
export MODEL_NAME="model_name" # unique name per test run — reusing the same name uploads a new version, not a new model
There was a problem hiding this comment.
|
|
||
| --- | ||
|
|
||
| ## Scripted testing |
There was a problem hiding this comment.
We should just remove this section, as it was just for internal testing
There was a problem hiding this comment.
|
|
||
| ```bash | ||
| runpodctl model add \ | ||
| --name "$MODEL_NAME" \ # the name to register the model under in your repo |
There was a problem hiding this comment.
There can't be comments after the \. The \ needs to be the last character on the line. The comments can go before or after.
There was a problem hiding this comment.
| ```bash | ||
| export USER_ID="$(runpodctl user | jq -r '.id')" # your Runpod user ID | ||
| export MODEL_HASH="$(runpodctl model list --name "$MODEL_NAME" | jq -r '.[0].versions[0].hash')" # the hash from step 3 | ||
| export MODEL_URL="https://local/${USER_ID}/${MODEL_NAME}:${MODEL_HASH}" # the full model reference URL |
There was a problem hiding this comment.
Let's get rid of this line, as we will build the Model URL and also the reference below
There was a problem hiding this comment.
| export MODEL_URL="https://local/${USER_ID}/${MODEL_NAME}:${MODEL_HASH}" # the full model reference URL | ||
| ``` | ||
|
|
||
| The resulting `MODEL_URL` will look like: |
There was a problem hiding this comment.
Get rid of this too, as we are no longer using this variable
There was a problem hiding this comment.
|
|
||
| ```bash | ||
| runpodctl serverless create \ | ||
| --name "$(whoami)_ctl_test" \ # name for the endpoint |
There was a problem hiding this comment.
This could be something more generic. whoami was confusing some users. It could be changed to:
--name "my_worker" \
There was a problem hiding this comment.
| --gpu-id "AMPERE_24" \ # GPU type | ||
| --workers-max 3 \ # maximum number of active workers | ||
| --workers-min 1 \ # minimum number of workers kept warm | ||
| --model-reference "$MODEL_URL" # attaches your model to the endpoint |
There was a problem hiding this comment.
Let's change this line to these two lines:
--model-reference "https://local/$USER_ID/$MODEL_NAME:$MODEL_HASH" \
--env MODEL_NAME="/runpod/model-store/modelrepo-local/models/$USER_ID/$MODEL_NAME/$MODEL_HASH"
There was a problem hiding this comment.
Also need to add the following to work around a bug in runpodctl:
--min-cuda-version "13.0"
There was a problem hiding this comment.
| ```bash | ||
| runpodctl serverless create \ | ||
| --name "$(whoami)_ctl_test" \ # name for the endpoint | ||
| --template-id "mockworker" \ # worker template to use |
There was a problem hiding this comment.
Let's change this line to:
--hub-id "cm8h09d9n000008jvh2rqdsmb" \
As that will actually do something if they use it, rather than being the mockworker which doesn't do anything
There was a problem hiding this comment.
|
I added some comments in line, but generically, for all of the shell script code blocks, there can't be comments after the last |
|
@Promptless can you address all the pending comments from brosenpod ? |
- Simplify MODEL_NAME example to a placeholder - Remove internal-only scripted testing section - Move inline comments off line-continuation (\) lines in shell blocks - Drop unused MODEL_URL variable and its example - Use generic --name, real --hub-id, and split model reference into --model-reference and --env, plus --min-cuda-version workaround - Mention the web UI as an alternative for sending test requests
|
Done — I've addressed all of @brosenpod's pending review comments and pushed the changes to this PR branch. Summary of what changed in
One additional cleanup: since The updated preview should refresh shortly. |
|
|
||
| ## How it works | ||
|
|
||
| When you create a Serverless endpoint with a model attached, Runpod fetches the model files from storage and caches them on the host machine before the worker container starts. Once the worker boots, the files are already on disk. This eliminates the download step that normally adds seconds or minutes to a cold start. |
There was a problem hiding this comment.
This section is technically true, but this is more what Model Store does. Model Repo is built on Model Store, so it still holds, but it is not specific to Model Repo.
There was a problem hiding this comment.
@Promptless can you take care of this comment?
|
|
||
| When you create a Serverless endpoint with a model attached, Runpod fetches the model files from storage and caches them on the host machine before the worker container starts. Once the worker boots, the files are already on disk. This eliminates the download step that normally adds seconds or minutes to a cold start. | ||
|
|
||
| Model files are stored in your private Runpod account on Cloudflare R2. Each uploaded version is content-addressed: after the upload, Runpod computes a hash of the files, and you use that hash to pin a specific version when configuring an endpoint. |
There was a problem hiding this comment.
I'm not sure if we want to specifically call out that we are using R2 underneath. Especially since we plan to move off of it at some point. We could say something like "Model files are stored in the Runpod ecosystem on private, secure storage."
| You pass this URL as the `--model-reference` flag when creating or updating an endpoint. Runpod uses it to know exactly which version of which model to cache on the host. | ||
|
|
||
| ## What you can upload | ||
| /* [ENGINEERING: Are all file types supported, or only specific ones? State this explicitly.] */ |
There was a problem hiding this comment.
All file types are supported, we do not any type checking.
|
|
||
| ## What you can upload | ||
| /* [ENGINEERING: Are all file types supported, or only specific ones? State this explicitly.] */ | ||
| /* [ENGINEERING: Is there a per-file size limit?] */ |
There was a problem hiding this comment.
Currently the max file size is 5TB
There was a problem hiding this comment.
@Promtpless add this to the doc
| ## What you can upload | ||
| /* [ENGINEERING: Are all file types supported, or only specific ones? State this explicitly.] */ | ||
| /* [ENGINEERING: Is there a per-file size limit?] */ | ||
| /* [ENGINEERING: Is there a total storage limit per account or per model?] */ |
There was a problem hiding this comment.
This is being implemented, but it hasn't been set yet. I recall the value 5TB being discussed, but the value needs to be decided.
There was a problem hiding this comment.
@Promptless create a place holder text for this
| /* [ENGINEERING: Are all file types supported, or only specific ones? State this explicitly.] */ | ||
| /* [ENGINEERING: Is there a per-file size limit?] */ | ||
| /* [ENGINEERING: Is there a total storage limit per account or per model?] */ | ||
| /* [ENGINEERING: How long does Runpod retain uploaded models? Is there a retention/expiry policy?] */ |
There was a problem hiding this comment.
We currently will retain them indefinitely.
|
|
||
| Your handler function reads `MODEL_NAME` to know where to load the model from. Model Repo only handles delivering the files to the host — your handler is fully responsible for loading the model and processing requests. | ||
|
|
||
| /* [ENGINEERING: Marcin's question — does Runpod do any additional wrapping of the model (e.g., auto-adding /ping, adding a handler wrapper)? The current doc says users write their own handler. Confirm this is accurate.] */ |
There was a problem hiding this comment.
We do not do anything special around the model besides mounting it.
| | **Multi-worker sharing** | Not shared across workers | Shared across all workers on the same volume | | ||
| | **Storage billing** | /* [ENGINEERING: how is Model Repo storage billed? $/GB/month?] */ | $0.07/GB/month | | ||
|
|
||
| Use Model Repo when: |
There was a problem hiding this comment.
We could also call out in this section that Model Repo gives more flexibility around being in multiple DCs, since a Network Volume is tied to a datacenter, and Model Repo can pull the same model into any DC.
| 3. Update your endpoint to reference the model URL. | ||
| 4. Update your worker code to load the model from the local path instead of from within the image. | ||
|
|
||
| /* [ENGINEERING: Anything specific users need to do if their model has baked images (e.g., embedded image assets in weights)? Any known edge cases?] */ |
There was a problem hiding this comment.
It would depend on how their current image uses that baked in model. They may need to reconfigure it to use the Model Repo model's path, rather than whatever is baked in.
|
|
||
| ## Storage | ||
|
|
||
| Model Repo stores your model files in Runpod's infrastructure, backed by [Cloudflare R2](https://developers.cloudflare.com/r2/). Your data is isolated to your Runpod account and is not accessible to other users. |
There was a problem hiding this comment.
As above, I am not sure if we want to specifically call out R2. But that is probably a Product decision.
|
|
||
| ## Compliance | ||
|
|
||
| /* [ENGINEERING: Ben Rosenberg mentioned linking to SOC1/SOC2 certs. What certifications does Runpod currently hold, and where are they published? Confirm the correct link for Runpod's security/compliance page.] --> |
There was a problem hiding this comment.
We should also double check that R2 also holds those certs and that the way we use it is also in line with those certs.
|
|
||
| **Who manages the storage infrastructure?** | ||
|
|
||
| Cloudflare R2 is the underlying object storage backend. Cloudflare applies encryption-at-rest using AES-256-GCM by default. Runpod manages the access layer and authentication — only your Runpod API key can retrieve your models. |
| --- | ||
|
|
||
| <Note> | ||
| Model Repo is currently in alpha and is available on Mac and Linux only. Windows support is coming soon. |
There was a problem hiding this comment.
In Beta now, instead of Alpha.
|
|
||
| Model Repo lets you upload your own models to private storage on Runpod and attach them directly to Serverless endpoints. Key benefits: | ||
|
|
||
| - **Faster cold starts**: Models are pre-cached on the worker host rather than downloaded at runtime. |
There was a problem hiding this comment.
This is only true some of the time. Sometimes it will have to be fetched from R2.
|
|
||
| ## Scripted testing | ||
|
|
||
| A shell script is available that runs all of the steps below automatically using mock model files. Download `model_repo_testing.sh` from the internal Notion page and run it to validate end-to-end without manually executing each step. |
There was a problem hiding this comment.
We don't want to be using that testing script anymore, especially externally. It was just for quick internal testing.
| ``` | ||
|
|
||
| <Warning> | ||
| `MODEL_NAME` must be unique for each test run. If you reuse the same name, the upload creates a new version of the existing model rather than a new model. |
There was a problem hiding this comment.
I would reword this to just the second part. "If you reuse the same MODEL_NAME, the upload creates a new version of the existing model rather than a new model."
|
|
||
| ```bash | ||
| runpodctl model add \ | ||
| --name "$MODEL_NAME" \ # the name to register the model under in your repo |
There was a problem hiding this comment.
The comments should go above in a block. The \ needs to be the final character on the line.
| ```bash | ||
| runpodctl model add \ | ||
| --name "$MODEL_NAME" \ # the name to register the model under in your repo | ||
| --model-path "$MODEL_PATH" \ # local path to the model files |
There was a problem hiding this comment.
Add:
--wait-for-hash \
This will automatically wait for the hashing process to complete, obviating the need for step 3, and is a better user experience.
|
|
||
| --- | ||
|
|
||
| ### Step 3: Wait for the model to be hashed |
There was a problem hiding this comment.
We can remove this section with the above --wait-for-hash addition.
|
|
||
| ```bash | ||
| runpodctl serverless create \ | ||
| --name "my_worker" \ # name for the endpoint |
There was a problem hiding this comment.
These comments also should go above in a block, so that \ is the last character on these lines.
| @@ -0,0 +1,171 @@ | |||
| --- | |||
There was a problem hiding this comment.
This doc seems like it has a lot of overlap with testing.mdx. Which one is the canonical document?
|
👋 Thanks for the ping! We're on it — applying the review feedback to |
|
Quick update: we've reviewed both comments on |
|
Thanks for the additional comments — we've got all of them. Update on
All of these are being applied together on this branch, and we'll follow up here once the changes are pushed. |
|
Update on all five review comments 👇 We've drafted, reviewed, and verified changes for every tagged comment on
We need a decision from you to publish these. This PR is based on the
Just reply here with your preference and we'll proceed. One more item (not yet tagged for us): the per-file size limit placeholder in the same section was answered in review as "5TB max file size," but that comment wasn't tagged for us, so we left it untouched. If you'd like that fact added too, tag it or let us know here. |
Addresses @brosenpod's review on PR #696: - Use provider-neutral storage wording (drop specific R2 mention) - Document all file types supported with no type checking - Add 5TB per-file maximum size - Note total per-account/per-model storage limit is still being finalized - Document indefinite retention of uploaded model files - Remove resolved internal engineering placeholders
|
@lavanya-gunreddi the write-access issue is resolved and the review feedback is now published — all six edits to
Review the full diff on the dashboard: https://app.gopromptless.ai/suggestions/abeea91e-64c8-483d-9fd6-5258513e7e32 |
Creates the Model Repo documentation set and applies reviewer feedback from this PR.
Review-feedback pass —
serverless/storage/modelrepo/overview.mdxApplied @brosenpod's engineering answers and the requested changes to the overview page. Per-item disposition:
The 5TB figure is documented as the per-file maximum only; the total per-account/per-model limit remains unquantified per the reviewer's "value needs to be decided" note. The other engineering placeholders on this page (handler wrapping, storage billing, baked-images edge cases) belong to separate review threads and were left untouched in this pass.