Training Foundation Models with your Custom Data