You can’t. Smartapps are written in smartthings’ own variation of groovy and run in the smartthings cloud.
There are many people who will use a raspberry pi as a “man in the middle” to create an integration with some other Platform, but those cases you aren’t running the smartapp itself on the pi. Just passing information back-and-forth.
The following FAQ explains how you install smartapps to your account:
And for questions about working with the raspberry pi, check the developer section of the forum.
But you’re probably best off by going to whatever thread had the discussion of the integration that you were trying to do and just asking your questions there.