Composite convex optimization with global and local inexact oracles