def _install_runtime_requirements()

in build_artifacts/v3/v3.0/v3.0.0/dirs/etc/sagemaker-inference-server/tornado_server/server.py [0:0]


    def _install_runtime_requirements(self):
        """Install the runtime requirements."""

        logger.info("Installing runtime requirements...")
        requirements_txt = self._path_to_inference_code.joinpath(self._environment.requirements)
        if requirements_txt.is_file():
            try:
                subprocess.check_call(["micromamba", "install", "--yes", "--file", str(requirements_txt)])
            except Exception as e:
                logger.error(
                    "Failed to install requirements using `micromamba install`. Falling back to `pip install`..."
                )
                try:
                    subprocess.check_call(["pip", "install", "-r", str(requirements_txt)])
                except Exception as e:
                    raise RequirementsInstallException(e)
        else:
            logger.debug(f"No requirements file was found at `{str(requirements_txt)}`")