First, note that just because you are on F1 doesn't necessarily mean you do not pass the Substantial Presence Test. Your days in F1 status are not exempt from the Substantial Presence Test if you have been an exempt individual for any part of 5 previous calendar years. So you would only be exempt from the SPT if you came on F1 in 2013 or later, and didn't come on F or J status before.
Assuming you do not pass the Substantial Presence Test for 2017, by default, you are a nonresident alien for all of 2017, and you cannot file jointly; you can only file as Married Filing Separately.
However, you have the option to use the First-Year Choice, since you have been in the US for at least a month of 2017, and you will meet the Substantial Presence Test in 2018. You will have to wait until you meet the SPT for 2018 (which will take almost half of 2018 to do, since your 2017 contribution to your 2018 SPT is very small), which will probably require you to file for an extension for your 2017 taxes. The First-Year Choice will make you a dual-status alien for 2017 -- resident from when you started H1b, and nonresident before. Note, however, that dual-status aliens also cannot file jointly.
However, once you have become dual-status, you can then use Nonresident Spouse Treated As Resident, since you are married and you are a resident at the end of the year and your spouse isn't. This will make you and your spouse both resident aliens for all of 2017, and require you to file as Married Filing Jointly.
Note that for you and your spouse, becoming resident will make your worldwide income the whole year subject to US taxation regardless of where you live (although you may be able to exclude it from taxes with the Foreign Earned Income Exclusion, though you would still have to report it), and, depending on your particular country's tax treaty with the US, might take away tax treaty benefits (some tax treaty provisions apply to resident aliens too, and some don't).