def METHOD_NAME(container: DIContainer, data_dir: Path):
    _register_conventions(container)
    container.register_instance(AWSInstance, AWSInstance())
    container.register_instance(MongoClient, MongoClient(MONGO_URL, serverSelectionTimeoutMS=100))
    container.register_instance(
        ILockableEncryptor, RepositoryEncryptor(data_dir / REPOSITORY_KEY_FILE_NAME)
    )
    container.register(Publisher, Publisher)
    _register_event_queues(container)
    _setup_agent_event_registry(container)
    _setup_agent_event_serializers(container)
    _register_repositories(container, data_dir)
    _register_services(container)
    # This is temporary until we get DI all worked out.
    ReportService.initialize(
        container.resolve(IAgentRepository),
        container.resolve(IAgentConfigurationService),
        container.resolve(IAgentEventRepository),
        container.resolve(IMachineRepository),
        container.resolve(INodeRepository),
        container.resolve(IAgentPluginService),
    )