Is it possible to add OS level dependencies?

I know that I can install npm dependencies, but some npm packages(for example pdf-image) depend on OS level dependencies like imagemagick ghostscript poppler-utils. Is there a way to use those dependencies when running a worker function?