Files
ubicloud/rhizome/inference_endpoint/bin/setup-replica
Benjamin Satzger df49c3a306 Provide engine start command to inference replica
This commit provides the full engine start command to the inference
replica during setup. That makes it easier to configure different types
of inference engines from the control plane.
2025-03-17 12:56:32 +01:00

30 lines
687 B
Ruby
Executable File

#!/bin/env ruby
# frozen_string_literal: true
require_relative "../../common/lib/util"
require_relative "../lib/replica_setup"
replica_setup = ReplicaSetup.new
params = JSON.parse($stdin.read)
begin
engine_start_cmd = params.fetch("engine_start_cmd")
replica_ubid = params.fetch("replica_ubid")
ssl_crt_path = params.fetch("ssl_crt_path")
ssl_key_path = params.fetch("ssl_key_path")
gateway_port = params.fetch("gateway_port")
max_requests = params.fetch("max_requests")
rescue KeyError => e
puts "Needed #{e.key} in parameters"
exit 1
end
replica_setup.prep(
engine_start_cmd:,
replica_ubid:,
ssl_crt_path:,
ssl_key_path:,
gateway_port:,
max_requests:
)