Nine soldiers were killed on Saturday in an attack claimed by Islamic State on a training camp belonging to the eastern Libyan forces of Khalifa Haftar, hospital authorities said.