post. You have two options: 1. Jointly file 1040 as resident after making statement as Pub.519 required.
2. File 1040NR separately. Taxation is such a complex issue. You should calculate per different options to see which one is better.
Look at Pub.519 which can be found on wwww.irs.gov
Also, before you ask question here, why not do some search? This topic has been discussed for million of times.