Class: OCI::DataScience::Models::OcirModelDeploymentEnvironmentConfigurationDetails
- Inherits:
-
ModelDeploymentEnvironmentConfigurationDetails
- Object
- ModelDeploymentEnvironmentConfigurationDetails
- OCI::DataScience::Models::OcirModelDeploymentEnvironmentConfigurationDetails
- Defined in:
- lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb
Overview
The environment configuration details object for OCI Registry
Constant Summary
Constants inherited from ModelDeploymentEnvironmentConfigurationDetails
ModelDeploymentEnvironmentConfigurationDetails::ENVIRONMENT_CONFIGURATION_TYPE_ENUM
Instance Attribute Summary collapse
-
#cmd ⇒ Array<String>
The container image run CMD as a list of strings.
-
#custom_http_endpoints ⇒ Array<OCI::DataScience::Models::InferenceHttpEndpoint>
List of custom inference HTTP endpoints configured on the model deployment instance for inferencing.
-
#default_environment_variables ⇒ Hash<String, String>
Service injected Environment variables set for the web server container and can not be set or modified by user.
-
#entrypoint ⇒ Array<String>
The container image run ENTRYPOINT as a list of strings.
-
#environment_variables ⇒ Hash<String, String>
Environment variables to set for the web server container.
-
#health_check_port ⇒ Integer
The port on which the container HEALTHCHECK would listen.
-
#image ⇒ String
The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format.
-
#image_digest ⇒ String
The digest of the container image.
-
#image_signature_id ⇒ String
OCID of the container image signature.
-
#predict_api_specification ⇒ String
The chosen specification from predefined set of endpoints a user can access.
-
#server_port ⇒ Integer
The port on which the web server serving the inference is running.
Attributes inherited from ModelDeploymentEnvironmentConfigurationDetails
#environment_configuration_type
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OcirModelDeploymentEnvironmentConfigurationDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from ModelDeploymentEnvironmentConfigurationDetails
Constructor Details
#initialize(attributes = {}) ⇒ OcirModelDeploymentEnvironmentConfigurationDetails
Initializes the object
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 146 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['environmentConfigurationType'] = 'OCIR_CONTAINER' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.image = attributes[:'image'] if attributes[:'image'] self.image_digest = attributes[:'imageDigest'] if attributes[:'imageDigest'] raise 'You cannot provide both :imageDigest and :image_digest' if attributes.key?(:'imageDigest') && attributes.key?(:'image_digest') self.image_digest = attributes[:'image_digest'] if attributes[:'image_digest'] self.image_signature_id = attributes[:'imageSignatureId'] if attributes[:'imageSignatureId'] raise 'You cannot provide both :imageSignatureId and :image_signature_id' if attributes.key?(:'imageSignatureId') && attributes.key?(:'image_signature_id') self.image_signature_id = attributes[:'image_signature_id'] if attributes[:'image_signature_id'] self.cmd = attributes[:'cmd'] if attributes[:'cmd'] self.entrypoint = attributes[:'entrypoint'] if attributes[:'entrypoint'] self.server_port = attributes[:'serverPort'] if attributes[:'serverPort'] raise 'You cannot provide both :serverPort and :server_port' if attributes.key?(:'serverPort') && attributes.key?(:'server_port') self.server_port = attributes[:'server_port'] if attributes[:'server_port'] self.health_check_port = attributes[:'healthCheckPort'] if attributes[:'healthCheckPort'] raise 'You cannot provide both :healthCheckPort and :health_check_port' if attributes.key?(:'healthCheckPort') && attributes.key?(:'health_check_port') self.health_check_port = attributes[:'health_check_port'] if attributes[:'health_check_port'] self.environment_variables = attributes[:'environmentVariables'] if attributes[:'environmentVariables'] raise 'You cannot provide both :environmentVariables and :environment_variables' if attributes.key?(:'environmentVariables') && attributes.key?(:'environment_variables') self.environment_variables = attributes[:'environment_variables'] if attributes[:'environment_variables'] self.default_environment_variables = attributes[:'defaultEnvironmentVariables'] if attributes[:'defaultEnvironmentVariables'] raise 'You cannot provide both :defaultEnvironmentVariables and :default_environment_variables' if attributes.key?(:'defaultEnvironmentVariables') && attributes.key?(:'default_environment_variables') self.default_environment_variables = attributes[:'default_environment_variables'] if attributes[:'default_environment_variables'] self.predict_api_specification = attributes[:'predictApiSpecification'] if attributes[:'predictApiSpecification'] raise 'You cannot provide both :predictApiSpecification and :predict_api_specification' if attributes.key?(:'predictApiSpecification') && attributes.key?(:'predict_api_specification') self.predict_api_specification = attributes[:'predict_api_specification'] if attributes[:'predict_api_specification'] self.custom_http_endpoints = attributes[:'customHttpEndpoints'] if attributes[:'customHttpEndpoints'] raise 'You cannot provide both :customHttpEndpoints and :custom_http_endpoints' if attributes.key?(:'customHttpEndpoints') && attributes.key?(:'custom_http_endpoints') self.custom_http_endpoints = attributes[:'custom_http_endpoints'] if attributes[:'custom_http_endpoints'] end |
Instance Attribute Details
#cmd ⇒ Array<String>
The container image run CMD as a list of strings. Use CMD as arguments to the ENTRYPOINT or the only command to run in the absence of an ENTRYPOINT. The combined size of CMD and ENTRYPOINT must be less than 2048 bytes.
36 37 38 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 36 def cmd @cmd end |
#custom_http_endpoints ⇒ Array<OCI::DataScience::Models::InferenceHttpEndpoint>
List of custom inference HTTP endpoints configured on the model deployment instance for inferencing.
87 88 89 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 87 def custom_http_endpoints @custom_http_endpoints end |
#default_environment_variables ⇒ Hash<String, String>
Service injected Environment variables set for the web server container and can not be set or modified by user.
75 76 77 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 75 def default_environment_variables @default_environment_variables end |
#entrypoint ⇒ Array<String>
The container image run ENTRYPOINT as a list of strings. Accept the CMD as extra arguments. The combined size of CMD and ENTRYPOINT must be less than 2048 bytes. More information on how CMD and ENTRYPOINT interact are here.
44 45 46 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 44 def entrypoint @entrypoint end |
#environment_variables ⇒ Hash<String, String>
Environment variables to set for the web server container. The size of envVars must be less than 2048 bytes. Key should be under 32 characters. Key should contain only letters, digits and underscore (_) Key should start with a letter. Key should have at least 2 characters. Key should not end with underscore eg. TEST_ Key if added cannot be empty. Value can be empty. No specific size limits on individual Values. But overall environment variables is limited to 2048 bytes. Key can't be reserved Model Deployment environment variables.
70 71 72 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 70 def environment_variables @environment_variables end |
#health_check_port ⇒ Integer
The port on which the container HEALTHCHECK would listen. The port can be anything between 1024 and 65535. The following ports cannot be used 24224, 8446, 8447.
56 57 58 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 56 def health_check_port @health_check_port end |
#image ⇒ String
The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. The container image is optional while using service managed open source foundation model. Acceptable format: <region>.ocir.io/<registry>/<image>:<tag> <region>.ocir.io/<registry>/<image>:<tag>@digest
19 20 21 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 19 def image @image end |
#image_digest ⇒ String
The digest of the container image. For example, sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
25 26 27 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 25 def image_digest @image_digest end |
#image_signature_id ⇒ String
OCID of the container image signature
29 30 31 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 29 def image_signature_id @image_signature_id end |
#predict_api_specification ⇒ String
The chosen specification from predefined set of endpoints a user can access. For example, if the value is 'openai', the user can access OpenAI-compliant endpoints like /v1/completions, /v1/chat/completions, /v1/models, etc., for inference.
82 83 84 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 82 def predict_api_specification @predict_api_specification end |
#server_port ⇒ Integer
The port on which the web server serving the inference is running. The port can be anything between 1024 and 65535. The following ports cannot be used 24224, 8446, 8447.
50 51 52 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 50 def server_port @server_port end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 90 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'environment_configuration_type': :'environmentConfigurationType', 'image': :'image', 'image_digest': :'imageDigest', 'image_signature_id': :'imageSignatureId', 'cmd': :'cmd', 'entrypoint': :'entrypoint', 'server_port': :'serverPort', 'health_check_port': :'healthCheckPort', 'environment_variables': :'environmentVariables', 'default_environment_variables': :'defaultEnvironmentVariables', 'predict_api_specification': :'predictApiSpecification', 'custom_http_endpoints': :'customHttpEndpoints' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 110 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'environment_configuration_type': :'String', 'image': :'String', 'image_digest': :'String', 'image_signature_id': :'String', 'cmd': :'Array<String>', 'entrypoint': :'Array<String>', 'server_port': :'Integer', 'health_check_port': :'Integer', 'environment_variables': :'Hash<String, String>', 'default_environment_variables': :'Hash<String, String>', 'predict_api_specification': :'String', 'custom_http_endpoints': :'Array<OCI::DataScience::Models::InferenceHttpEndpoint>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 218 def ==(other) return true if equal?(other) self.class == other.class && environment_configuration_type == other.environment_configuration_type && image == other.image && image_digest == other.image_digest && image_signature_id == other.image_signature_id && cmd == other.cmd && entrypoint == other.entrypoint && server_port == other.server_port && health_check_port == other.health_check_port && environment_variables == other.environment_variables && default_environment_variables == other.default_environment_variables && predict_api_specification == other.predict_api_specification && custom_http_endpoints == other.custom_http_endpoints end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 259 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
239 240 241 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 239 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
248 249 250 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 248 def hash [environment_configuration_type, image, image_digest, image_signature_id, cmd, entrypoint, server_port, health_check_port, environment_variables, default_environment_variables, predict_api_specification, custom_http_endpoints].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 292 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
286 287 288 |
# File 'lib/oci/data_science/models/ocir_model_deployment_environment_configuration_details.rb', line 286 def to_s to_hash.to_s end |