Yes - you can certainly apply from the US. Note that it can take a few months for the application to be processed - so make sure you plan accordingly. Also, sometimes the chances of approval seem to be higher when you apply from your home country since it's easier to show strong ties and prove you have no plans on remaining in Canada long term.