> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Ray Model Deployment

> Job configuration specifications

export const schema = {
  "type": "object",
  "title": "Create Ray Model Deployment",
  "description": "Deploys a Ray Serve model into the Fusion cluster using a Docker image from the specified repository. Configure the model name, CPU and memory limits, Docker image details, and replica counts to launch the deployment. The deployed model is accessible via the Fusion ML Model Service after the job completes.",
  "required": ["id", "deployModelName", "modelCpuLimit", "modelMemoryLimit", "modelDockerRepo", "modelDockerImage", "type"],
  "properties": {
    "id": {
      "type": "string",
      "title": "Job ID",
      "description": "Sets the unique identifier for this job, used to reference it in the API. Allowed characters: a-z, A-Z, dash (`-`), and underscore (`_`). Must start with a letter.",
      "maxLength": 63,
      "pattern": "[a-zA-Z][_\\-a-zA-Z0-9]*[a-zA-Z0-9]?"
    },
    "sparkConfig": {
      "type": "array",
      "title": "Additional parameters",
      "description": "Injects additional key-value pairs into the training JSON map at runtime. String values must be wrapped in quotes. Use this to pass custom parameters not exposed in the UI.",
      "hints": ["advanced"],
      "items": {
        "type": "object",
        "required": ["key"],
        "properties": {
          "key": {
            "type": "string",
            "title": "Parameter Name"
          },
          "value": {
            "type": "string",
            "title": "Parameter Value"
          }
        }
      }
    },
    "writeOptions": {
      "type": "array",
      "title": "Write Options",
      "description": "Sets additional key-value options passed to the Spark writer when writing output to Solr or other sinks. Use entries like `commitWithin=10000` to control Solr commit behavior.",
      "hints": ["advanced"],
      "items": {
        "type": "object",
        "required": ["key"],
        "properties": {
          "key": {
            "type": "string",
            "title": "Parameter Name"
          },
          "value": {
            "type": "string",
            "title": "Parameter Value"
          }
        }
      }
    },
    "readOptions": {
      "type": "array",
      "title": "Read Options",
      "description": "Sets additional key-value options passed to the Spark reader when loading input from Solr or other sources. Use these to configure connector-specific behavior.",
      "hints": ["advanced"],
      "items": {
        "type": "object",
        "required": ["key"],
        "properties": {
          "key": {
            "type": "string",
            "title": "Parameter Name"
          },
          "value": {
            "type": "string",
            "title": "Parameter Value"
          }
        }
      }
    },
    "deployModelName": {
      "type": "string",
      "title": "Model name",
      "description": "Sets the DNS-compatible name used to identify this Ray model deployment within the cluster. Must be lowercase, contain no underscores, and be at most 30 characters. This name is used in Kubernetes resource names.",
      "maxLength": 30,
      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
    },
    "modelMinReplicas": {
      "type": "integer",
      "title": "Model min replicas",
      "description": "Sets the minimum number of Ray Serve replicas maintained for this model deployment. Increasing this value ensures availability under sustained load. Reduce to save resources when idle.",
      "default": 1
    },
    "modelMaxReplicas": {
      "type": "integer",
      "title": "Model max replicas",
      "description": "Sets the maximum number of Ray Serve replicas that can be scaled up for this model deployment. The autoscaler will not exceed this limit. Set higher values to handle burst traffic.",
      "default": 1
    },
    "modelCpuLimit": {
      "type": "number",
      "title": "Model CPU limit",
      "description": "Sets the maximum number of CPU cores that a single Ray model replica can use. This limits resource consumption per replica. Adjust based on the model's computational requirements.",
      "default": 1
    },
    "modelMemoryLimit": {
      "type": "string",
      "title": "Model memory limit",
      "description": "Sets the maximum memory allocated to a single Ray model replica, expressed as a Kubernetes quantity such as `1Gi` or `512Mi`. Increase this value if the model runs out of memory during inference.",
      "default": "1Gi",
      "pattern": "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
    },
    "modelImportPath": {
      "type": "string",
      "title": "Ray deployment import path",
      "description": "Specifies the Python import path for the Ray Serve deployment entry point within the Docker image. The default `deployment:app` references an `app` object in a `deployment` module. Adjust to match your image's entry point.",
      "default": "deployment:app"
    },
    "modelDockerRepo": {
      "type": "string",
      "title": "Docker repository",
      "description": "Specifies the Docker registry and repository path where the model image is stored, such as `gcr.io/my-project/my-model`. The cluster must have pull access to this registry."
    },
    "modelDockerImage": {
      "type": "string",
      "title": "Image name",
      "description": "Specifies the Docker image name and tag to deploy for this Ray model, such as `my-model:v1.0`. The image must exist in the repository specified by `modelDockerRepo`."
    },
    "modelDockerSecret": {
      "type": "string",
      "title": "Kubernetes secret name for model repo",
      "description": "Specifies the Kubernetes secret used to authenticate with the Docker repository when pulling the model image. Create this secret in the cluster namespace before deploying. Omit for public registries."
    },
    "type": {
      "type": "string",
      "title": "Spark Job Type",
      "enum": ["argo-deploy-ray-model"],
      "default": "argo-deploy-ray-model",
      "hints": ["readonly"]
    }
  },
  "additionalProperties": true,
  "category": "Other",
  "categoryPriority": 1
};

export const SchemaParamFields = ({schema}) => {
  const sanitize = str => {
    if (typeof str !== "string") return str;
    return str.replace(/^"(.*)"$/s, "$1").replace(/\\/g, "").replace(/"/g, "'");
  };
  const renderMd = str => {
    const s = sanitize(str);
    const text = (/[.!?]\)*$/).test(s) ? s : `${s}.`;
    return text.split(/(\*\*[^*]+\*\*|_[^_]+_|`[^`]+`)/g).map((part, i) => {
      if (part.startsWith("**")) return <strong key={i}>{part.slice(2, -2)}</strong>;
      if (part.startsWith("_")) return <em key={i}>{part.slice(1, -1)}</em>;
      if (part.startsWith("`")) return <code key={i}>{part.slice(1, -1)}</code>;
      return part;
    });
  };
  const {description, properties = {}, required: requiredProps = []} = schema;
  const visibleProps = useMemo(() => Object.entries(properties).filter(([, prop]) => !prop.hints?.includes("hidden")), [properties]);
  const renderProp = ([name, prop]) => {
    const isRequired = requiredProps.includes(name);
    const hasDefault = prop.default !== undefined;
    const rawDefault = prop.default;
    const hints = prop.hints || [];
    const isComplexDefault = hasDefault && (typeof rawDefault === "object" || typeof rawDefault === "string" && (rawDefault.length > 20 || rawDefault.includes('"')));
    const postBadges = [];
    if (prop.title) {
      postBadges.push(<><span className="text-stone-400 dark:text-stone-500">API property: </span>{name}</>);
    }
    const constraints = [];
    if (prop.minimum !== undefined && prop.maximum !== undefined) {
      constraints.push(`Range: ${prop.minimum} – ${prop.maximum}`);
    } else if (prop.minimum !== undefined) {
      constraints.push(`Min: ${prop.minimum}`);
    } else if (prop.maximum !== undefined) {
      constraints.push(`Max: ${prop.maximum}`);
    }
    if (prop.minLength !== undefined && prop.maxLength !== undefined) {
      constraints.push(`Length: ${prop.minLength} – ${prop.maxLength}`);
    } else if (prop.minLength !== undefined) {
      constraints.push(`Min length: ${prop.minLength}`);
    } else if (prop.maxLength !== undefined) {
      constraints.push(`Max length: ${prop.maxLength}`);
    }
    const fieldProps = {
      key: name,
      body: prop.title || name,
      type: prop.type,
      ...postBadges.length > 0 && ({
        post: postBadges
      }),
      ...isRequired && ({
        required: true
      }),
      ...!isComplexDefault && hasDefault ? {
        default: sanitize(String(rawDefault))
      } : {}
    };
    const isObject = prop.type === "object" && prop.properties;
    const isArrayOfObjects = prop.type === "array" && prop.items?.type === "object" && prop.items.properties;
    return <ParamField {...fieldProps}>
        {prop.description && <p>{renderMd(prop.description)}</p>}

        {prop.enum && <p>
            Allowed values: 
            {prop.enum.map((v, i) => <>{i > 0 && ", "}<code key={i}>{String(v)}</code></>)}
          </p>}

        {constraints.length > 0 && <p className="text-stone-500 dark:text-stone-400 text-sm">
            {constraints.join(" · ")}
          </p>}

        {isComplexDefault && <div className="flex">
            <p>
              <strong>Default:</strong>
            </p>
            <pre className="!my-0">
              <code>
                {JSON.stringify(rawDefault, null, 2)}
              </code>
            </pre>
          </div>}

        {isArrayOfObjects && <Expandable title="item properties">
            <SchemaParamFields schema={{
      properties: prop.items.properties,
      required: prop.items.required
    }} />
          </Expandable>}

        {isObject && <Expandable title="properties">
            <SchemaParamFields schema={{
      properties: prop.properties,
      required: prop.required
    }} />
          </Expandable>}
      </ParamField>;
  };
  return <div>
      {description && <p>{renderMd(description)}</p>}

      {visibleProps.map(renderProp)}
    </div>;
};

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/create-ray-model-deploy

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/create-ray-model-deploy

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/kqmqh1

Lucidworks Search 5.9.12 uses Ray to deploy machine learning (ML) models into production.

This job deploys a Ray deployment into the Lucidworks Search cluster.

To create the job, sign in to Lucidworks Search and click **Collections > Jobs**. Then click **Add+** and in the Model Deployment Jobs section, select **Create Ray Model Deployment**.

You can enter basic and advanced parameters to configure the job. If the field has a default value, it is populated when you click to add the job. To enter advanced parameters in the UI, click **Advanced**.

<LwTemplate />

## Configuration properties

<SchemaParamFields schema={schema} />
