def is_running_on_docker_container() -> bool:
    """Returns True if the current process is running inside a Docker container, False otherwise."""
    global _in_docker_container

    if _in_docker_container is None:
        if is_running_on_huggingface_space():
            _in_docker_container = True
        else:
            _in_docker_container = _has_docker_env() or _has_docker_cgroup()

    return _in_docker_container
Returns True if the current process is running inside a Docker container, False otherwise.
argilla-server/src/argilla_server/telemetry/_helpers.py