To do this whole process though, you'll also want to have an IOM fin alignment and measuring jig. It makes all the alignment steps so much easier and accurate.
You'll also need a fin, a bulb, heavy fiberglass (I use 6oz. from kayak building instead of the 1.4oz I normally use for RC sailboats. If you only have lightweight cloth then you'll have to do several layers), epoxy, etc...
Trim the fin to the shape you need to fit your space.
Tape the fin completely with packaging tape. The brown type seems to be the thinnest. Make sure to also tape the end cuts that you've made. Anything not taped will stick to the epoxy and you'll ruin the fin.
Coat the taped fin with a LOT of petroleum jelly or other release agent everywhere you expect the epoxy to go.
Coat the taped area with fiberglass and epoxy. Fill the top where you really can't get the fiberglass to conform with thickened epoxy.
The next day you'll struggle to release the fin but it should eventually come out.
Trim the fin box to the size and shape you need. You'll want to leave it a bit over-sized for now and do the final trimming after installation.
Use the fin alignment jig to install and epoxy in the box. The fin will be in the box while curing so be sure that you keep the packaging tape on the fin through this step. You should probably recoat it with release agent too.
The picture below is what you end up with.