I used indoor/outdoor carpet adhesive for the main deck areas. I believe it was Roberts 6700 that I purchased at Home Depot. I used Weldwood contact cement for the lids, as the carpet had to be wrapped around the lids, where the carpet adhesive won't grab right away.

If you choose to use contact cement for the whole boat, you only have one shot when laying the carpet down. If you use carpet adhesive, you have time to reposition the carpet and such.