If you are married, you would both file a petition for joint bankruptcy. Your spouse is not required to file for bankruptcy with you. You can file by yourself. In some cases, this may be smarter. If one of you has a perfect credit score, there is no point in ruing that score with a joint bankruptcy claim.
However, if you are both in debt, filing joint bankruptcy will save you money because you will have once filing fee instead of two.