These are two different plants that are often confused. They have different growing needs.
Most people, in the US, confuse the sweet potato (Ipomoea batatas) with the yam (Dioscorea rotundata). They do look superficially similar, but their nutritional value, growing habits, and taste are not that similar.
Let's start with the yam.
Yams are a subtropical/tropical vine, growing best in zone 9 or higher. Some can grow in zone 8 with care. In parts of zone 7, it can be grown as an annual, ornamental vine, but it won't produce many tubers, if any. For the most part, it does not grow well in the United States, even with care - most of the US is too cold.
Yams are vines, and need trellises for support of their vine canopies. They need more space than what is available in a tire stack or a 30 gallon bag, so planting them in the ground is best - 3 feet apart and 3 - 4 inches deep. Setts, seeds, or cuttings can be planted - yams, under the right conditions, are very fertile. They require sandy clay loam augmented with loose compost. It takes 10 months for the tubers to form. The ground must stay warm the entire time - 77*F or warmer and night time temps need to remain above 77*F for 9 or 10 months. That doesn't happen even in sunny Oklahoma.
Air potatoes (Dioscorea bulbifera) are a close relation of yams, and it's possible to grow them as far north as zone 7, but they are an invasive plant, growing as much as 8 inches a day, and can reach heights/lengths of 70 feet. Not all species of air potatoes are edible - some are quite toxic. If you choose to grow air potatoes make sure you get one that is edible. The bulbils - rounded growths that form at the juncture of the leaves - are the "potato" that's edible. In zones 8 and the southern most portions of zone 7, it may grow up to 10 feet. The first year after planting, it may produce bulbils, but frost and freezes will kill it back. Extremely hardy vines may come back for a year or two, but will produce less and die earlier.
You might be able to grow them in containers, especially if you supplied heat during the cooler nights.
I have not personally grown air potatoes, but I have friends in Austin, TX who do. For them air potatoes are an annual plant and they harvest some bulbils, but not enough to be a main crop.
Sweet potatoes, on the other hand, while also tropical, can be grown in bags like potatoes, and thus grown in protected areas where they can live through their lengthy growing season - 4 - 6 months. It needs to have full sunlight as long as possible and heat isn't an issue. They do need to be kept moist (not wet)
You'll want to create slips: skewer a sweet potato and set it in a glass of water so 1/3 to 1/2 of the potato is submerged. Place the glass in a sunny window. In a few days, it will have roots on the water end and sprouts on the air end. "Slip" the little 4 - 5" sprouts off and plant 2 or 3 slips per bag. You don't have to root the slips, they'll root themselves rather quickly. Make bags like the potato bags - a woven plastic bag such as rice comes in, a bag sewn from weed barrier cloth, or a large heavy duty plastic bag. The 13 gallon bags are big enough because you don't have to mound the dirt for sweet potatoes. A 13 gallon trash can also works. If you use tire stacks, fill it with the soil all the way to the top instead of stacking one tire at a time as with potatoes. Stick 2 or 3 of the slips directly into the warm soil. They will set roots and grow if it's warm enough. You can supplement the heat with eat lamps and UV sun lamps until the weather warms up. Protect the vines from high winds and keep it in full sun - shade will slow down the production of tubers.
Like yams, sweet potatoes like a sandy clay loam augmented with loose compost - the looser the soil the larger the tubers.
Georgia Jet is a short season sweet potato that can grow farther north and take slightly cooler temperatures. They can grow in soil temperatures of 60*F instead of 77*F. You might still need to supplement the heat if night temps are below 60*F, but growing in a bag means you can use a small space heater, especially if you are growing them on a sunny porch or patio.