Once you get them taken care of inside spray around the outside of your house thoroughly (if you haven't done so already.) We had them get into our house last year and I had to declare all out war on them until 5 am one night to obliterate them. Like you, they first came in because of the dog food although they got into other food in the cabinets as well. And this was on the second floor since we have a full basement keeping our main level above ground so that was a little frustrating I realize they can go as high as they want, but they usually don't climb too high. I backtracked their entrance point and sprayed poison and cut off the entrance with that spray foam and that seemed to work well.
We also got a big Rubbermaid-like container from Organized Living to store our dog's food in. It's the only one we could find that size that's airtight so the ants can't get in (or even smell it hopefully.) Plus it keeps the food nice and fresh for the dog. I also second the comment in your other thread about putting your cat's food out in a dish with a moat around it. They actually make cheap little dishes like that where the food area is surrounded by the larger water area. That's what I use in our basement where he stays during the day.
Good luck with your chemical warfare.