In my opinion, I would pay the 2017 taxes first. I will eliminate or reduce any interest and failure to pay penalties that would accrue if they aren't paid. That will leave you with more money to pay estimated 2018 taxes.
Even with an installment agreement, there is interest that will be charged and generally there is also a penalty of 1/2 of 1% per month (failure to pay penalty) on the unpaid 2017 taxes.
Also, as 2018 goes along, you may be able to accumulate some more money from your income and/or other sources to pay 2018 estimated taxes. Even if you don't pay or fully estimate the first quarter installment of 2018 ES taxes, if you make it up on the other quarterly installments, the penalty computed on Form 2210 may be quite small.
Also, you don't know for certain how the rest of 2018 will play out. It may be possible that an exception for 2018 might be met so there might not be a penalty for 2018?