Unfortunately, SageMaker Studio architecture at this moment doesn't allow you to run apps through Jupyter Proxy on a kernel gateway. Therefore, running Streamlit in an image terminal is a little bit tricky.
One of the options is to use SageMaker SSH Helper library. After reading and completing the "Getting Started" section, you will need to jump to the "Local IDE integration with SageMaker Studio over SSH". Inside the script sm-local-ssh-ide
there are lines with the port forwarding instructions for the SSH client.
You will need to add one more:
-L localhost:8501:localhost:8501 \
After you complete all steps and run this script, your Streamlit app that you've started inside the SageMaker Studio image terminal will be available on your local machine at http://localhost:8501/.
If you want to learn more how SageMaker Studio works, I recommend this nice blog post by Giuseppe Angelo Porcelli and Vikesh Pandey: Dive deep into Amazon SageMaker Studio Notebooks architecture.