A suicide bomber attacked a military barracks in southern Algeria on Sunday morning, killing a soldier, the defense ministry said.