The LM317 T can be used as a constant-current source. In the LED specifications I can see two pages describing the current limit for various heat resistance values. Use a large heat sink for the power dissipation. Junction temperature of 120 deg.C is easy to exceed, long life requires the recommended 80 deg.C max value. Use a small fan if possible. Lowering the temperature causes no harm, contrary to overheating.
LOok in professional LED designs for how to do it. LED lamps sold to replace light bulbs still suffer by overheating in narrow mounting spaces.