Informational dependence between statistical or quantum subsystems can be described with Fisher information matrix or Fubini-Study metric obtained from variations/shifts of the sample/configuration space coordinates. Using these (noncovariant) objects as macroscopic constraints, we consider statistical ensembles over the space of classical probability distributions (i.e. in statistical space) or quantum wave functions (i.e. in Hilbert space). The ensembles are covariantized using dual field theories with either complex scalar field (identified with complex wave functions) or real scalar field (identified with square roots of probabilities). We construct space–time ensembles for which an approximate Schrodinger dynamics is satisfied by the dual field (which we call infoton due to its informational origin) and argue that a full space–time covariance on the field theory side is dual to local computations on the information theory side. We define a fully covariant information-computation tensor and show that it must satisfy certain conservation equations. Then we switch to a thermodynamic description of the quantum/statistical systems and argue that the (inverse of) space–time metric tensor is a conjugate thermodynamic variable to the ensemble-averaged information-computation tensor. In (local) equilibrium, the entropy production vanishes, and the metric is not dynamical, but away from the equilibrium the entropy production gives rise to an emergent dynamics of the metric. This dynamics can be described approximately by expanding the entropy production into products of generalized forces (derivatives of metric) and conjugate fluxes. Near equilibrium, these fluxes are given by an Onsager tensor contracted with generalized forces and on the grounds of time-reversal symmetry, the Onsager tensor is expected to be symmetric. We show that a particularly simple and highly symmetric form of the Onsager tensor gives rise to the Einstein–Hilbert term. This proves that general relativity is equivalent to a theory of nonequilibrium (thermo)dynamics of the metric, but the theory is expected to break down far away from equilibrium where the symmetries of the Onsager tensor are to be broken.