Skip to content

Streamlined local dev env using nix develop

Kamil Breguła edited this page Apr 5, 2023 · 4 revisions
  1. Install Nix and enable flakes

  2. Clone

$ git clone https://github.com/streamlit/streamlit
$ git checkout develop
$ git submodule update --init
$ cd streamlit
  1. Start nix develop and build the source
$ nix develop
$ cd lib
$ python -m venv venv
$ source ./venv/bin/activate
$ cd ..
$ make all-devel
  1. Start the hello world app
# Terminal 1
$ cd frontend && yarn start

# Terminal 2
$ cd lib && source ./venv/bin/activate
$ cd .. && streamlit hello

Testing

$ cd lib && source ./venv/bin/activate && cd ..
$ make python-init-dev-only
$ pytest
$ make jstest