We use pip-tools to manage our python dependencies and create reproducible environments.
- pip-tools for dependency management
- Our requirements are tracked in ../backend/requirements
- We use
pip-compileto generate arequirements.txtfile with hashes - We track both in version control
- We use
requirements.txtto install dependencies locally as well as in deployed environments. - To avoid architecture-related complications, it's recommended to first exec into a Docker container before running the compilation:
docker compose exec web /bin/bashpython -m piptools compile --allow-unsafe --generate-hashes --output-file=requirements.txt ./requirements/requirements.in
If you are running the Docker containers, they will automatically install.
If you are running locally, you can run:
cd backend
pip install -r requirements.txtfor the dependencies for the project. Developer dependencies (like linters) can be installed with:
cd backend
pip install -r dev-requirements.txt