An ideal compressible fluid is considered, with an,equilibrium density bein
g a given function of coordinates due to presence of some static external f
orces. The slow flows in such system, which do not disturb the density, are
investigated with the help of the Hamiltonian formalism. The equations of
motion of the system are derived for an arbitrary given topology of the vor
ticity field. The general form of the Lagrangian for frozen-in vortex lines
is established. The local induction approximation for motion of slender vo
rtex filaments in several inhomogeneous physical models is studied.