Hi folks, I am building a Docker image with dockerTools. It contains Python packages.
However, while the resulting image does contain the Python libraries I am looking for (i.e. it has the files in the nix store) I can’t import the Python libraries as ususal. For example
import requests will fail. This is in contrast to my (non docker) usage of nix-shell where I can simply import the package after getting a shell for the package name.
Does anyone know how to make it work in Docker? Can’t find anything on Google.
I have tried adding
pathsToLink. This makes it so that the Python packages directly mentioned make it into the global
In contrast, using nix shell seems to put every single dependency into the
PYTHONPATH environment variable. It seems to me that this is the behaviour I would need to replicate to get to the desired results.