FluidSynth does this fairly simply. The user manual describes the large list of options available to tailor operation, but to render a MIDI file to WAV the simplest command is:
fluidsynth <soundfont file> -F <output file> <MIDI file>
fluidsynth "GT Steel.sf2" -F "high-hopes.wav" high-hopes.mid
Some alternatives ...