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.

This procedure supports uploads to Amazon S3 and S3-compatible object storage.
  1. 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>"}
    
  2. 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>
    
  3. Upload the files.
    python3 import_to_airgap.py --src ./models \
      --dst <remote_object_storage_path> \
      --cloud aws --repo-type mistral --repo-id <repository ID>
    
    For --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 pvc and add --endpoint <endpoint URL>. If a custom certificate authority issued the endpoint certificate, also add --ca-bundle <path to CA bundle file>.

  4. Verify the upload.
    aws s3 ls <remote_object_storage_path>/mistral/<repository ID>/artifacts/ --recursive
    

    For S3-compatible storage, add --endpoint-url <endpoint URL>. The list must contain the files in the weights/<repository ID> directory, the files in the draft weights directory, the files in the tokenizers directory, and the mistral-staging.json file. If files are missing, do not continue: an incomplete upload makes the import fail.