Skip to content

Instantly-working M1-native Streamlit development environment using VSCode, Docker, and Conda.

Notifications You must be signed in to change notification settings

jroes/streamlit-getting-started-m1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

streamlit-getting-started-m1

This is an instantly-working M1-native Streamlit development environment using VSCode, Docker, and Conda.

Background

Getting a working development environment on OSX is challenging these days with the new Apple M1 chip. This makes it super easy to get a working development environment.

Requirements

Note: If you use the Apple Silicon build for VS Code, you'll get a much faster experience, but technically this will still work in the Intel-based VSCode.

How to use

  1. Clone this repo (git clone https://github.com/jroes/streamlit-getting-started-m1)
  2. Open in VSCode (code .)
  3. Press Cmd+Shift+P and search for "Dev Containers: Reopen in Container"

This will build the underlying Docker container. From there you should be able to do things like:

  • Open a new Terminal window in VSCode and run streamlit hello
  • Run any other streamlit commands, such as streamlit run streamlit_app.py
  • VSCode will automatically ask you to open/re-route ports so you can access the app, and give you a link to visit your app in a browser.

How this works

This repository contains:

  • A Dockerfile that sets up a working Python 3.8 + conda + Linux environment for ARM-based CPUs (e.g. the new Apple M1 chip)
  • A devcontainer.json that will automatically configure VSCode to build & use this container.
  • A fairly-empty streamlit_app.py you can streamlit run as a starting point.

Acknowledgements

Much of this work would not be possible without the work that the VSCode team has done in building images for standard platforms.

There's also some great work that exists from the conda-forge team that includes aarch64-compatible builds of various dependencies.

About

Instantly-working M1-native Streamlit development environment using VSCode, Docker, and Conda.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published