TeachMeTW / CNN

https://www.cisconeural.net
4 stars 2 forks source link

Create a IPYNB Page for Sandbox #11

Open TeachMeTW opened 4 weeks ago

TeachMeTW commented 4 weeks ago

Feature Request: Add IPython Notebook Sandbox as a New Page in Existing Streamlit App

Summary

We would like to add a new page to our existing Streamlit app that acts as an IPython Notebook (ipynb) sandbox. This feature will allow users to write and execute Python code within a secure environment, displaying both input and output cells similar to Jupyter Notebooks.

Requirements

  1. New Page in Streamlit App:

    • Create a new page in the current Streamlit app dedicated to the IPython Notebook-like sandbox.
    • Use Streamlit's multi-page support (e.g., via the st.sidebar.selectbox or st.page for navigation).
  2. Code Execution in a Secure Sandbox:

    • Ensure the execution environment is isolated and secure, USE LAMBDA PLEASE
    • Limit execution time, CPU, and memory usage to prevent resource abuse.
    • Reset the environment after a session ends or a certain period of inactivity.
  3. Security and Isolation:

    • Execute code in a secure, isolated environment to prevent any malicious activity.
    • Ensure that users do not have access to sensitive parts of the file system or backend.
    • Implement a timeout for long-running processes or code executions.

Please refer to:

https://stackoverflow.com/questions/49873779/hosting-interactive-jupyter-notebook-on-private-website