class_docstr: Placeholder docstring
class_docstr_tok: ["Placeholder","docstring"]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _start_torch_serve(
      self,
      client: object,
      image: str,
      model_path: str,
      secret_key: str,
      env_vars: dict,
  ):
      """Placeholder docstring"""
      self.container = client.containers.run(
          image,
          "serve",
          detach=True,
          auto_remove=True,
          network_mode="host",
          volumes={
              Path(model_path): {
                  "bind": "/opt/ml/model",
                  "mode": "rw",
              },
          },
          environment={
              "SAGEMAKER_SUBMIT_DIRECTORY": "/opt/ml/model/code",
              "SAGEMAKER_PROGRAM": "inference.py",
              "SAGEMAKER_SERVE_SECRET_KEY": secret_key,
              "LOCAL_PYTHON": platform.python_version(),
              **env_vars,
          },
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/model_server/torchserve/server.py
imports: from __future__ import absolute_import
  import requests
  import logging
  import platform
  from pathlib import Path
  from sagemaker.base_predictor import PredictorBase
  from sagemaker.session import Session
  from sagemaker.serve.utils.exceptions import LocalModelInvocationException
  from sagemaker.s3_utils import determine_bucket_and_prefix, parse_s3_url
  from sagemaker import fw_utils
  from sagemaker.serve.utils.uploader import upload
  from sagemaker.local.utils import get_docker_host
label_desc: Use image node_id 1 for calling the LocalTorchServe obj's underlying member method code with example usage: obj._start_torch_serve(client, image, model_path, secret_key, env_vars) without return types