In this tutorial you will create a Streamlit app within a container then export the container in its entirety as a ‘.containds’ file for you to share with a colleague. The colleague can import it directly into their own computer’s ContainDS application, and see your app for themselves.

Create a new container

We will first create the same container and app that we made in the Getting Started with Streamlit tutorial, so you already have that running you can skip to the ‘Export container to a file’ step.

In ContainDS, click on the ‘+ NEW’ button and then into the ‘Image’ tab:

Click ‘SELECT’ on streamlit-launchpad. After the image has been downloaded, in the configuration screen click CREATE to accept the defaults (container name and new empty folder for the workspace location).

Once ready, you will see the running container details:

There aren’t any apps (py files) to run yet, so let’s make one. Copy the contents of Streamlit’s example into a file called in the workspace folder. The full path to your folder can be seen next to ‘Workspace’ above, and you can click it to open the folder in Explorer or Finder.

Click on the ‘WEB’ button, or ‘Launch Streamlit in Browser’, to launch Streamlit Launchpad in your default web browser to check everything is working.

Export the container to a file

Close the Streamlit browser tab, then back in ContainDS make sure the same container is still highlighted. Click on the ‘Share’ tab. The ‘Export’ sub-tab should be visible, asking for a folder location where the ‘.containds’ file should be written.

The default of your Downloads folder should be fine. Just click ‘EXPORT’.

You should see some output while the container is committed and exported. Finally, the full filename of the saved file will be displayed.

Share with a colleague

You can now send that ‘.containds’ file to someone else. It will be large, so cannot be sent over email. Dropbox or a USB stick may work best.

Your colleague should install and run ContainDS, then click on the ‘File’ tab once running. Locate the ‘.containds’ file that was shared with them and click ‘Start’. Some progress information will be displayed during the import:

Once complete, the container will start and ContainDS will show you the new container’s log screen:

Click ‘WEB’ to launch straight into the Streamlit screen:

Click into the app to see the final presentation: