I can successfully create a Python Data Source and use it, but now I’m trying to use various pip libraries (like
awswrangler), which aren’t installed in the docker image.
My question is how do I go about making these packages available to the Python Data Sources that I create within Redash?
I guess I could
exec into the redash worker containers and
pip install them manually, but I’d need to redo this work every time the container was stopped.
I’m thinking another way of doing this is to edit the
docker-compose.yml file, add a
volume my host machine’s
site-packages for Python, and then add that volume as an “Additional Module Path” to the data source. I’m also assuming that would require create a virtual environment to ensure the packages are installed using the same version of python that’s being used in the Redash docker image? But, I’m not sure which container to do this in, and I can’t seem to figure out the version of Python being used. The Dockerfile sure looks like it’s 3.7, but executions of
docker-compose exec <container> python --version show 2.7 and
python3 isn’t in the PATH of any of the containers.
How do others solve this issue? Thanks!
Edit: the images in question were built using the AWS AMI. If that’s old and I should be using an updated image (e.g.
docker-compose pull) that’d be good to know!