A boundary integral numerical method for the dynamics of nonspherical cavitation bubbles in inviscid incompressible liquids is described. Only surface values of the velocity potential and its first derivatives are involved. The problem of solving the Laplace equation in the entire domain occupied by the liquid is thus avoided. The collapse of a bubble in the vicinity of a solid wall and the collapse of three bubbles with collinear centers are considered