The inside of the Local Roots TerraFarm in New York City’s Murray Hill neighborhood looks like a mix between a dimly lit-but-hip spin studio and something out of The Matrix. Butter lettuce, in both green and red varieties, kale and arugula line the walls from floor to ceiling, with blue and red LED lights pulsating above them, leaving all the plants looking slightly purple.

“We spoil these guys and they thrive,” Eric Ellestad, CEO of the Los Angeles-based vertical farming company Local Roots, tells me while lovingly pointing to a robust head of lettuce.

We’re meeting on a brisk December morning in New York but inside the upcycled shipping container that holds the TerraFarm, there’s nothing but the warmth of technological harmony, the hyper-controlled indoor conditions needed for these plants to flourish.

Across the country in Los Angeles, a team of plant and data scientists monitor the inside of the shipping container to make it every plant’s dream—everything from the air quality to how much red versus blue light is directed towards the plant—by using a combination of traditional farming know-how and modern technology like artificial intelligence and machine learning.

The result may very well be the future of food.

Inside their 40 foot shipping containers, TerraFarms can grow produce year round nearly anywhere in the world. Currently, the containers are only in Los Angeles, but they plan to expand within the next year. (The one I visited in New York was a demo, and holds less food than an operational container does.) Just one operational TerraFarm can produce 4,000 heads of lettuce every 10 days—600 times more than an outdoor farm, according to the company’s press release, which announced this week that the company has achieved cost parity with traditional outdoor farms, meaning they can create produce at the same cost as food grown outdoors.

“Plants are designed to survive, but when you can actually create the conditions for them to flourish, it’s incredible,” Ellestad told me. “And then you can start to say, how do you actually optimize for what a customer actually wants, which is in some cases shelf life—that’s important—but also flavor and nutrition and a story and a message that they believe in,” he said.

And the technology they use to pack shelf life, flavor and nutrition into the plants all while saving immense amounts of resources is fascinating. “We’re insulating ourselves from outside environments,” Local Roots’ COO Matt Vail tells me. Vail has a background in medicine and biochemical engineering, but after working in various labs he realized he wanted to focus on helping people get healthy through a combination of food and technology. “I’ve always been excited about and talented at using technology to do that,” he said.

“We have hundreds of sensors tracking temperature, humidity, C02 levels, taking photos of the plants themselves, taking measurements of the water temperature, the PH, different parameters and telling us what is the farm like,” Vail explained. That data goes to the cloud, then a data science team “can grab it, manipulate it, work with it, use machine learning algorithms or write some other piece of code that can process that, with the end goal being to optimize the conditions we give the plant for some desired outcome.”

Of course, farmers have been “trying to control the environment of their crops for thousands of years,” Ellestad told me. But those historic problems include making crop yields predictable and cost-effective.

By controlling everything and conserving resources, the desired outcome of a TerraFarm is often the yield, but it can be hyper specific depending on who the buyer is. TerraFarm has clients in a variety of industries, like hospitals and restaurants, but the whole idea is that their produce will be affordable for people who aren’t high-end chefs looking for their perfect basil. (Though if you grow basil under mostly blue light, it gets spicier and spicier, the pair told me.) As a consumer today, you could find Local Roots produce at certain restaurants in Southern California, but with plans to expand, it’s likely going to get a lot easier to find their food.

When growing crops outdoors, farmers have to think about what food is most durable for the schlep from farm to packhouse to processor to packaging and distribution centers and finally to your grocery store. “That lands them pretty squarely on iceberg lettuce,” Ellestad said. But using a mixture of traditional farming techniques and cutting edge technology, Local Roots can “optimize for this flavor profile, or this nutrient density, and do that fall winter summer spring, in sunny Southern California exactly like we can in New York in the winter or Saudi Arabia in the summer,” he said.

TerraFarms use 99 percent less water than traditional farms, don’t have to use pesticides, and can create food that’s more nutritious. That’s a huge deal considering food is less nutritious today than it was a few decades ago due to soil depletion, and that there are millions of people around the world who are undernourished. And with 2.5 billion additional people expected to live on Earth by 2050, according to the Local Roots press release, we’re going to need a lot more food. Especially considering that today one in nine people around the world go to bed hungry, according to the UN’s World Food Programme, which Local Roots was recently accepted into. (The Programme works locally and globally to address global food issues such as hunger and malnutrition and helps provide food to people in crisis.)

And the traditional food system can go very wrong. Ellestad gave me one example: in the Middle East, they import a lot of food. “Their growing season is very short so when a conflict breaks out and supply chains get shut down, some of those countries only have a week or two of food for their entire country on hand,” he said, adding that “very quickly a national security issue can turn into a food security issue.”

But even when there aren’t national security issues at play, Ellestad argues that the current process is broken. He’s familiar with what the traditional food distribution process looks like, as he used to work at his family’s semi truck and trailer manufacturing company. “I saw up close and firsthand the existing conventional supply chains of these kinds of products,” he said. And in the U.S., “52 percent of all the produce we grow gets lost somewhere throughout that chain,” he said.

“We don’t live in a world of infinite resources, and a lot of us experience that very personally,” Ellestad said. And Millennials (like himself, he told me) want “to buy from companies that have a mission and care about what they do and why they exist,” and are transparent around those things. And people are getting increasingly curious about what the existing issues in the food system are: “We all have smartphones nowadays, we’ve seen the Netflix documentaries, people are starting to ask questions about the food system which historically was very very opaque,” Ellestad said.

Local Roots was founded in 2014 and is based in Los Angeles, and has 35 people on staff across a range of disciplines: TerraFarm workers, assembly workers, plant scientists, computer scientists, etc. But many people, Ellestad and Vail told me, don’t have a background in farming, and instead are getting the opportunity to work “in an urban environment and reconnect with agriculture,” Ellestad told me. “A lot of young people, especially millennials, are looking for job opportunities that let them work with technology and learn about it and develop skills of the future as well as work on something impactful.”

Local Roots isn’t the only business using vertical farming to change the way we eat, to be clear. But their mission is important in that it aims to use a combination of traditional and modern techniques to make growing and distributing food more sustainable for everyone, and to ultimately have TerraFarms in remote areas, operated by the people in the community. As Ellestad told me, “Our whole mission around improving global health, that’s a very broad and audacious statement, but that includes everyone, not just folks who can afford to eat at farmers markets, or shop at premium high end realtors. We want to make this kind of produce and this kind of benefit accessible to everyone.”