https://www.irs.gov/pub/irs-pdf/i1040nr.pdf says: You can file your Form 1040NR electronically.
Beginning with your 2016 Form 1040NR, you can electronically file (e-file) your return.
The form instructions beneath the e-file form at https://www.irs.gov/pub/irs-pdf/f8879.pdf which shows that the form is designed to include 1040NR state: Beginning in 2017, you can use Form 8879 to e-file your 2016 Form 1040NR, U.S. Nonresident Alien Income Tax Return.
The IRS does not allow electronic filing for Form 1040NR-EZ or Dual status returns. Those returns must be filed on paper.
A valid ITIN is necessary for efiling. Returns that use a temporary ITIN will not be eligible for efile, and should be paper filed.
2015 and prior Form 1040NR must be filed on paper.