@Santosh While you do have the ability to SSH into the instance, it's a limited environment best for when developing and working with local files. Any commands that require elevation will not work.
Especially, in your case, external dependencies are best managed in a custom container as the environment on the consumption plan is recycled as your function app scales. Another option would be to bundle the external dependencies along with your function app assuming you could include all dependencies along with it and ensure it works on Azure, but either way, the customer container approach is the best suited approach since you could test the container as a whole which runs as-is on azure.