If we can build a sealed habitat on mars capable of recycling water and growing its own food, we can do the same here on earth. Just give it a dedicated fission reactor to keep the greenhouses running, distribute half a dozen of them around the world so that they can't all die to direct impacts, and fortify them heavily to keep the starving masses out.