I'm not sure if we run any inference endpoints on Ubuntu 22.02, but if we do, this code wouldn't work with them.
30 lines
769 B
Ruby
Executable File
30 lines
769 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: engine_start_cmd,
|
|
replica_ubid: replica_ubid,
|
|
ssl_crt_path: ssl_crt_path,
|
|
ssl_key_path: ssl_key_path,
|
|
gateway_port: gateway_port,
|
|
max_requests: max_requests
|
|
)
|