Any such ship is going to grow its own food. They may need to carry some extra matter to compensate for accidentally or inevitably lost biomatter. But otherwise they would be able to recycle the same biomatter repeatedly to create food. The only limiting factor is energy. You'll need to add energy in every cycle. Recycling isn't going to happen for it.
Of course, all of this comes with the caveat that nothing like this may exist yet. Sealed mass ecosystems exist in glass jars, but something on the scale of a ship is going to be an entirely different ballgame.