Creating the Model entry in Cloudera AI Registry in an air-gapped environment
After uploading the model files, create the model in Cloudera AI Registry. During registration, Cloudera AI Registry copies the files from the remote object storage location into its internal storage.
For instructions on creating a Mistral model, see Registering a Mistral Model.
curl -X POST https://<registry-host>/api/v3/models \
--header "Cookie: hadoop-jwt=$HADOOP_JWT" \
-H "Content-Type: application/json" \
-d '{"name": "tiny-random-gpt2",
"create_model_version_request_payload": {
"metadata": {"model_repo_type": "HF"},
"download_model_repo_request": {
"source": "REMOTE",
"repo_id": "hf-internal-testing/tiny-random-gpt2",
"remote_object_storage_path": "<remote_object_storage_path>"}}}'curl -X POST https://<registry-host>/api/v3/models \
--header "Cookie: hadoop-jwt=$HADOOP_JWT" \
-H "Content-Type: application/json" \
-d '{"name": "llama-3.1-8b-instruct",
"create_model_version_request_payload": {
"metadata": {"model_repo_type": "NGC"},
"download_model_repo_request": {
"source": "REMOTE",
"repo_id": "nim/meta/llama-3.1-8b-instruct:fp8-tool-calling",
"remote_object_storage_path": "<remote_object_storage_path>"}}}'-
name: The name of the Model in Cloudera AI Registry. The name can have a maximum of 50 characters. -
model_repo_type:HFfor a Hugging Face Model, orNGCfor an NVIDIA NGC (NIM) Model. -
source:REMOTE, to import the Model from the remote object storage location. -
repo_id: The repository ID that you used for the download and the upload. -
remote_object_storage_path: The path fromGET /api/v3/config, exactly as returned. If the value differs, the request fails with HTTP 400.
id field in the
response):curl --header "Cookie: hadoop-jwt=$HADOOP_JWT" https://<registry-host>/api/v3/models/<model ID>/versions/1The status field progresses from REGISTERING to
UPLOADING, and finally to READY. Once the status is
READY, the model is available for deployment.
If the status changes to UPLOAD_FAILED, the error_message
field of the model version describes the reason for the failure. For additional details,
review the import job logs as described in Troubleshooting Failed Mistral Model
Imports. After correcting the uploaded files, register a new version of the model
using the same model values.
