As for which container, there aren't many choices. You'll need to use a hard-side container such as the BearVault BV200 ($70; www.bearvault.com) or the Garcia Backpackers' Cache ($70; www.backpackerscache.com). Both are simply plastic containers that have a lid designed to be resistant to bears' grimy paws. The BearVault uses a threaded lid that works like a child-proof cap and must be depressed and twisted at the same time. The Backpackers' item has latches that require some sort of a tool (such as a coin or key) to open.
Each of these containers will hold enough food for one person for six to seven daysprovided you're moderately frugal with your food, as they really aren't all that big. Their bulk isn't much of an issuefood takes ups space, no matter whatbut they will add up to three pounds to your load. But so it goes. And, in addition to the container, it's prudent to add an odor-proof liner, such as an Aloksak waterproof bag ($10.50 for the 12-by-12-inch-sized bag from ARGear.com).
Note that in Yosemite you can't use an Ursack, a soft bag made of an extremely tough fabric impenetrable to prying bears that came out a few years ago. They've done well in tests with real bears, but most national parks still bar them from use because the results are not sufficiently conclusive. Moreover, the Ursack people can't even make bags at the momentthe military has requisitioned all supplies of the super-tough fabric used to make the Ursack.
Of course, even with a bear-proof container, you still want to go the extra mile. Put everything that smells like food in the container, including things such as toothpaste. It's helpful to cook some distance from your campground. And try not to wear the same clothes to bed that you cook in. Yosemite bears are black bears, not grizzlies, but you still don't want to get too close and personal with one. Also, it's worth noting that Yosemite officials advise against the hang-it-from-a-tree approach because it is largely ineffective and results in tree damage from persistent bears. Bear canisters are also available for hire from several Yosemite locations for $5 per every two weeks, which certainly should present a much more economical option than dropping $70 for your own.
"Some Bet on My Death": Read the final words of Alaskan bear researcher Timothy Treadwell, mauled to death in September 2003 by the very bears he had hoped to befriend.