Skip to content

Update Dockerfile - Fixes pandas installation #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

BWMac
Copy link
Contributor

@BWMac BWMac commented Feb 24, 2025

Problem

I realized because of an error encountered by an nf-synapse user that the newer versions of the synapseclient docker container do not have pandas installed properly.

Solution

This issue was caused by mixing apt-get installing python3-pandas with a base Python image. The problem being that Python packages installed via apt-get don't automatically integrate with the Python environment from the Docker base image. Fortunately we have a pandas extra built into setup.cfg, so I switched to installing it that way.

Testing

Built the container locally, started up a Python terminal inside of it, and ran import pandas. If you do this with sagebionetworks/synapsepythonclient:v4.7.0 you get an import error.

# Problem

I realized because of an error with `nf-synapse` that the newer versions of the `synapseclient` docker container do not have `pandas` installed properly.

# Solution

This issue was caused by mixing `apt-get` installing `python3-pandas` with a base Python image. The issue being that Python packages installed via `apt-get` don't automatically integrate with the Python environment from the Docker base image. Fortunately we have a `pandas` extra built into `setup.cfg`, so I switched to installing it that way.

# Testing

Built the container locally, started up a Python terminal inside of it, and ran `import pandas`. If you do this with `sagebionetworks/synapsepythonclient:v4.7.0` you get an import error.
@BWMac BWMac requested a review from a team as a code owner February 24, 2025 21:34
Copy link
Member

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

@BWMac BWMac merged commit ddf28d9 into develop Feb 25, 2025
21 of 25 checks passed
@BWMac BWMac deleted the updates-dockerfile-pandas-install branch February 25, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants