Ginkgo Bioworks, a startup known for its work turning bacteria into consumer goods, is partnering with marijuana producer Cronos to make lab-grown cannabis.

The $122-million deal, announced this week, will allow Ginkgo to use Cronos' Canadian lab space to make several different marijuana compounds without a farm.

Ginkgo's CEO told Business Insider the deal could have big potential for the pharmaceutical industry, who's been hard at work turning marijuana compounds into medications.

After months of searching, it was love at first sight for Jason Kelly, the CEO of a startup known for its work turning bacteria into consumer goods such as fragrances.

Kelly's company, called Ginkgo Bioworks, had been looking for a marijuana production partner so it could apply its technology to cannabis. Using a process similar to that which it uses to make flavors and scents, the company aimed to make lab-grown marijuana strains with pharmaceutical potential.

Then it discovered Cronos, a Toronto-based cannabis producer founded in 2013.

"They had green rooms, automated tracks to move plants around, A to B testing on various light configurations — everything. It was exactly what we'd been looking for," Kelly told Business Insider.

As part of a $122-million deal announced this week, Ginkgo will use Cronos' Canadian lab space to play with marijuana's DNA. Ginkgo aims to manufacture a handful of the plant's better-known compounds like CBD (the non-psychoactive compound that's not responsible for a high) and THC, as well as some of its lesser-known components, such as THCV, which staunches appetite but is only present in the plant in very low quantities.

Using its technology, Ginkgo could make all of these ingredients at a lower cost and in desired quantities, Kelly said.

If successful, the work would be of major interest to pharmaceutical companies, which have long been eyeing marijuana's compounds for use in medications and have recently begun turning them into federally-approved drugs.

"There's so much new discovery work on the pharmaceutical side that's possible using our approach," Kelly said. "That's definitely an area that we're excited about."

Kelly's company — which has also partnered with big names like Bayer AG and Cargill — hopes to use the processes it has already perfected using yeast and fragrances to create eight marijuana compounds in Cronos' Canadian labs.

Marijuana-based pharmaceuticals grown in labs instead of farms

For years, pharmaceutical companies have been actively searching for ways to turn marijuana's compounds into medications. There's been a hint of progress in recent years.

In June, the federal government approved Epidiolex, a CBD-based epilepsy drug; last year, it green-lit Marinol, a drug made with lab-grown THC that treats nausea and other side-effects of chemotherapy and AIDS.

But drug makers continue to face high costs for conventionally-grown marijuana. In addition, they must navigate a confusing web of state and federal laws in order to get their products approved.

The potential to solve these problems with marijuana that's grown in a lab rather than on a farm was a big impetus behind Ginkgo's deal with Cronos, said Kelly.

"Beyond THC and CBD, there's a whole class of rare cannabinoids in [the plant], but accessing them at a remotely reasonable cost hasn't been feasible," he said.

Through the deal with Cronos, he aims to change that.

"Cronos had a view that what matters is ingredients and cost — and the technology to prove it."