For 165 years, workers came to the Brooklyn Navy Yard to build ships. Now, it's where entrepreneurs are coming to create the future.

(New Lab CEO Shaun Stewart shows NY1 their Brooklyn Navy Yard offices.)

More than 130 tech startup companies operate out of New Lab, an 85,000-square-foot shared work space at the Navy Yard where entrepreneurs come to get a foothold in the city's booming tech economy.

"It's not just renting a space," says New Lab CEO Shaun Stewart. "It's actually partnering with us. We help you build your business, introduce you to sources of capital, introduce you to pilot opportunities and potential stakeholders."

Since opening two years ago, New Lab has been nearly full, with a waiting list for offices and desks.

Tech companies come to the facility to perfect new technologies. One of those companies is Carmera, which creates maps to help autonomous vehicles navigate.

(The Carmera van uses machine vision and geospatial data pipelines to extract rich texture and insight for autonomous vehicles.)

"To build a company that's trying to solve one of the most complex problems in the autonomous vehicle space, and to be able to test that and figure it out in a complicated, dense urban environment is one of the most important challenges to solve," says Jessie Lazarus, Carmera's head of business development.

This surge of tech activity in the five boroughs would have been unheard of a decade ago.

But in the last several years, New York has become a major tech hub, second only to the Bay Area, with an ecosystem that includes huge tech firms like Google and Facebook and 9,000 small startups raising more than $10 billion in venture capital.

Observers say the invention of the smartphone helped to change everything. It led to a startup boom, with entrepreneurs opening new companies aimed at developing apps, many for industries that play a dominant role in New York's economy, like finance and real estate.

"New York has some of the best base of talent that you can ever find for a real estate technology, fast-growing startup," says Aaron Block, the co-founder of MetaProp, a venture capital firm the helps real estate technology startups. "It doesn't get any better."

(A CNC machine, part of New Lab’s prototyping labs, helps startups undertake product development on-site, from design to working prototype.)

One of the companies Block is funding is Enertiv, which is developing technology to help buildings run more efficiently.

"This is the real estate capital of the world," says Enertiv's marketing head, Comly Wilson. "We deal with large buildings, over 100,000 square feet, and there's no city in the world that has more of these, more sophisticated operators."

Google, which employs 7,000 people in the city, operates its own startup incubator called Area 120, where its employees can develop their own ideas.

Elias Roman ended up at Google after he sold his Queens-based music curation startup Songza to the tech giant five years ago. He's now working inside Google on a new startup.

"Just from a retention perspective you have big companies who are wondering what it's like to start a company, 'Maybe I should leave and start one,'" he says. "This is a great way of retaining exceptional talent and letting them pursue entrepreneurial endeavors."

Companies like Google not only get new business ideas from their own internal incubators, but from the outside startups they often end up buying.

When those startups are local, they have the potential to make the growing New York tech scene even bigger.