  We give sufficient conditions for a group acting on a geodesic metric space
to be acylindrically hyperbolic and mention various applications to groups
acting on CAT($0$) spaces. We prove that a group acting on an irreducible
non-spherical non-affine building is acylindrically hyperbolic provided there
is a chamber with finite stabiliser whose orbit contains an apartment. Finally,
we show that the following classes of groups admit an action on a building with
those properties: orthogonal forms of Kac--Moody groups over arbitrary fields,
and irreducible graph products of arbitrary groups - recovering a result of
Minasyan--Osin.
