def start_marqo_container(self, version: str, volume_name: str):
        """
        Start a Marqo container after pulling the required image and creating a volume.

        Args:
            version (str): The version of the Marqo container to start.
            volume_name: The volume to use for the container.
        """
        source = "docker"  # Always DockerHub for released images
        image_name = f"marqoai/marqo:{version}"
        container_name = f"marqo-{version}"
        self.logger.info(f"Starting Marqo container with version: {version}, volume_name: {volume_name}, source: {source}")

        # Pull the image
        self.pull_marqo_image(image_name, source)

        # Stop and remove the container if it exists
        try:
            container = self.docker_client.containers.get(container_name)
            self.logger.debug(f"Stopping and removing existing container: {container_name}")
            container.stop()
            container.remove()
        except NotFound:
            self.logger.warning(f"Container {container_name} does not exist. Skipping removal.")

        # Create volume and configure mounting
        volume_name = self.create_volume_for_marqo_version(version, volume_name)
        if version >= self.marqo_transfer_state_version:
            volume_mount_path = "/opt/vespa/var"
        else:
            volume_mount_path = "/opt/vespa"
        self.logger.info(f"Mounting volume: {volume_name} to {volume_mount_path}")

        # Start the container
        try:
            self.logger.info(f"Starting container: {container_name} with image: {image_name}")
            container = self.docker_client.containers.run(
                image=image_name,
                name=container_name,
                detach=True,
                ports={"8882/tcp": 8882},
                environment={
                    "MARQO_ENABLE_BATCH_APIS": "TRUE",
                    "MARQO_MAX_CPU_MODEL_MEMORY": "1.6"
                },
                volumes={volume_name: {"bind": volume_mount_path, "mode": "rw"}}
            )
            log_stream = container.logs(stream=True, follow=True)
            self.containers_to_cleanup.add(container_name)

            # Wait for the Marqo service to start
            self.logger.debug("Waiting for Marqo to start...")
            while True:
                try:
                    response = requests.get("http://localhost:8882", verify=False)
                    if "Marqo" in response.text:
                        self.logger.info("Marqo server started successfully.")
                        break
                except requests.ConnectionError:
                    pass
                # Read and log container output
                try:
                    log_line = next(log_stream)
                    if log_line:
                        log_text = log_line.decode("utf-8").strip()
                        self.logger.debug(log_text)
                except StopIteration:
                    self.logger.warning("Log stream unexpectedly ended.")
                    break
                time.sleep(0.5)

            #Stop following logs after Marqo starts
            self.logger.debug("Stopped following docker logs")

        except APIError as e:
            raise RuntimeError(
                f"Failed to start Docker container {container_name}, with version: {version}, and volume_name: {volume_name}"
            ) from e

        Start a Marqo container after pulling the required image and creating a volume.

        Args:
            version (str): The version of the Marqo container to start.
            volume_name: The volume to use for the container.
        
tests/compatibility_tests/docker_manager.py