I had been planing on getting a dog as a graduation present for myself for the last two years (I use to do competitive obedience and agility and really missed having a dog). Planning ahead though is key for sure. If grad. students can manage having kids you can manage a dog easily. I graduated in December and got my golden retriever puppy Summer (now 5.5 months old) and did exactly what you said... I crate trained from day one, established a regular exercise routine, and attend many obedience classes. Since I have competed for several years in obedience I do most of the training on my own but take her to classes for the sake of being socialized with other dogs/people and having that second opinion about any potential concerns I might have with the trainer. I take her for a 10-15 min bike ride in the morning after breakfast and then she is pretty tired and just sleeps in her crate while I run errands or go to work in the lab. When I have to be out of the house for an extended period of time I just take her to the dog park for an hour or so in the evening and so she can get all the crazy out. A tired dog is a well behaved dog
I recently just accepted my offer into a Ph.D. program at UNL and I feel confident that Summer will be totally fine by the time I start. By the way, I also found an apartment that contains a dog park on site, so maybe you can find one too... they are becoming increasingly popular
Pets are natural stress relievers and antidepressants and that is something almost every grad. student is going to need! So I think having a dog is a great idea as long as you can time manage just a little. If you get a puppy the first 4 months are the hardest so definitely make sure you have those first 2 months to devote a lot of time to him/her... else wise adopting an adult dog is better since they typically are already trained, aren't teething, and don't have as much energy.