I believe you need to work on methods of getting this teacher on your side. It's kind of a "keep your friends close... keep your enemies closer" type thing. It may sound manipulative, but what I am referring to is a skill you need to develop and hone. This type of skill will serve you well for the rest of your life, once learned. It's not easy, and there isn't one way to do it that fits all situations. But, I can tell you from experience... In life, you will constantly be faced with having to navigate these types of personalities. Sometimes, it's a teacher, a professor, a co-worker/supervisor/boss, a relative or in-law etc... Battling everyone, whether right or wrong grows old fast. Being able to get disagreeable people to agree with you, and in turn help you, will be a key to your own success.
In some situations you have more control than others, where you can make a decision for yourself on whether it's worth finding a way to bridge a divide,, or whether you are better off moving on.
Other times there may be complications in just leaving, and it's these times that learning how to get people on your side!
(Whether or not you truly "like" them is a separate issue and inconsequential, as is the fact that to be on your side they don't have to "like" you either).
I used to buck the system whenever challenged by difficult or unfair personalities. I found more often than not that I was "Cutting of my own nose to spite my face"! It takes a bit of effort, reading, tolerance, patience to learn.
I can't stress how much this is NOT about having to like everyone, nor agreeing with them. It's not about compromising your moral compass, it's not about pandering or ass-kissing either. It's about bringing out the best in people, especially with regard to your interests and/or mutual interests. It's not about being manipulative, but rather perhaps persuading to help you as opposed to making your life difficult.
I'll edit in some references to material I found helpful.
.oO()Oo.oO (I'm not a real programmer,, I just play one on the Forums!!!) Oo.oO()Oo.