The code is based on the size of yr joists. You're limited in how close to the top and bottom and end you may drill. But, you have to check with your township office. Don't go by advice here on this. Once you drill, going back's a pain.
Assuming your location is permissible, then I would drill slightly larger and foam insulate. The insulation will prevent bugs and heat loss and provide support and shock absorbtion between the pipe n joist.