12V * 3 Amps = 36Watts, 36 Watts * 8 Hours = 288 Watt Hours Add 20% for Efficiency Losses = 345.6 Watt Hours.
If you do 3.7V Cells, You'll Need a total of 93 Amp Hours (93,000 mAH) of batteries. An 18650 is roughly 2400 mAH (on a REALLY REALLY good day), so if you were to use those, you would need about 40 of them).
For 5 Amps, it's worse.. 155 Amp Hours or about 65 18650 Lithium Cells.
This all assumes a switching power supply with 80% + efficiency.
Ben