I have seen solar fence chargers. They’re a bit spendy, but maybe better than trying to run a cord across or under your driveway. My dog showed me today that our electric fence is working around my layer coop. Poor guy - accidentally touched it with his nose, and I heard a sound I’d never heard before come out of him! Then he ran up to the house yelping. He gave that coop a very wide berth tonight. I would strongly suggest electric if you have a bear wandering around.