Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
To manage my dependencies I use pip-tools. I don't like Pipenv or Poetry because in my IMHO they do too much trying to simultaneously manage the virtualenv and dependency updates. See this article which shows how to use all three in Docker.
Take a look at Poetry. It's now my go-to method for creating and managing virtual environments. It has all of the benefits of Pipenv in terms of managing your venvs and letting your activate them easily, but it's much smoother and faster than Pipenv and if you're publishing libraries, it'll automatically create the setup.py for you.
You can find an example here : https://github.com/Atem18/docker-django/blob/main/docker-images/Dockerfile
You can make it hands free using a few line shell script too which gets run during your Docker build process, it involves using the -c flag of pip3. I have an example of that here: https://github.com/nickjj/docker-django-example