Uploading a Mistral model
Upload the downloaded files to the remote object storage location configured for Cloudera AI Registry. Cloudera AI Registry imports the model from this location.
-
Get the remote object storage path of Cloudera AI Registry.
curl -sk "https://<registry-host>/api/v3/config" \ --header "Cookie: hadoop-jwt=$HADOOP_JWT" | jq '.remote_object_storage_path'The response contains the path:{"remote_object_storage_path":"s3://<bucket>/<path>"} -
Set the credentials that have write access to this location. For Amazon S3, use
environment variables:
export AWS_ACCESS_KEY_ID=<access key> export AWS_SECRET_ACCESS_KEY=<secret key> export AWS_DEFAULT_REGION=<region> -
Upload the files.
Forpython3 import_to_airgap.py --src ./models \ --dst <remote_object_storage_path> \ --cloud aws --repo-type mistral --repo-id <repository ID>--dst, use the path from step 1. The script appends/mistral/<repository ID>to the path.For S3-compatible storage with its own endpoint, use
--cloud pvcand add--endpoint <endpoint URL>. If a custom certificate authority issued the endpoint certificate, also add--ca-bundle <path to CA bundle file>. -
Verify the upload.
aws s3 ls <remote_object_storage_path>/mistral/<repository ID>/artifacts/ --recursiveFor S3-compatible storage, add
--endpoint-url <endpoint URL>. The list must contain the files in theweights/<repository ID>directory, the files in the draft weights directory, the files in thetokenizersdirectory, and themistral-staging.jsonfile. If files are missing, do not continue: an incomplete upload makes the import fail.
