A large cargo ship with a fire in its hold is being kept 2 miles (3.22 kilometers) offshore of an Alaska port as a precaution while efforts are undertaken to extinguish the flames, the U.S. Coast Guard said Saturday.