Press fit 18mm magnet holder for acrylic enclosure. I use four of these guys to mount the front panel of my 3d printer enclosure as to make it easy to remove and replace.
I use a hammer and a small piece of wood (to dampen the blow) to pound in the magnet, but a press or clamp would probably work just as well to install the magnet.
In terms of mounting it to my enclosure I found that acrylic cement does a great job of adhering the PLA to acrylic. 3M super strength adhesive or something of similar strength works well for adhering the other magnet to the enclosure.