I at one time actually installed carpet, but in houses, churches and commercial buildings and such. And that included stretch in and glue down as well. So the technique is very close to that in boats also.
One thing I will tell you straight up, carpet has grain. That meaning when it was manufactured it has a direction it was made with. So when install carpet, make certain it all is glued in at that same direction.
I drew chalk line arrows on the back side to keep the direction correct. Otherwise it will not look the same. If you install a piece in the wrong direction, it will actually look like a different color and look like it doesn't belong there.
And I am using Weldwood contact cement. I am sure others will chime in with their ideas and how to's as well. So read all of them and pick the one that suits your needs the best and install.