We consider the homogenization of an elliptic spectral problem with a large potential stated in a thin cylinder with a locally periodic perforation. The size of the perforation gradually varies from point to point. We impose homogeneous Neumann boundary conditions on the boundary of perforation and on the lateral boundary of the cylinder. The presence of a large parameter 1/ε in front of the potential and the dependence of the perforation on the slow variable give rise to the effect of localization of the eigenfunctions. We show that the jth eigenfunction can be approximated by a scaled exponentially decaying function that is constructed in terms of the jth eigenfunction of a one-dimensional harmonic oscillator operator.