Photon transport in a dissipative chain of nonlinear cavities