It kind of depends what you mean by "racist" - do they just make rude jokes about foreigners, are are they KKK horsewhipping burning-paper-bag-with-a-turd-in-it-through-the-letterbox style gun-toting loonies?either way, their prejudices will be based on ignorance - if you can make them see that racial stereotypes aren't actually true, maybe you can save the friendships. Personally I think I'd run quite fast.
Best of luck, and try not to let it get you down. Sympathies,
English Jon