Skip to content

Commit ddf28d9

Browse files
authored
Update Dockerfile - Fixes pandas installation (#1169)
# 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.
1 parent a9aa55f commit ddf28d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ RUN apt-get update \
88
python3-dev \
99
python3-setuptools \
1010
python3-pip \
11-
python3-pandas \
1211
&& rm -rf /var/lib/apt/lists/*
1312

1413
RUN pip3 install --upgrade pip
1514

1615
WORKDIR /synapsePythonClient
1716
COPY . .
1817

19-
RUN pip install --no-cache-dir .
18+
RUN pip install --no-cache-dir .[pandas]
2019

2120

2221
LABEL org.opencontainers.image.source='https://github.com/Sage-Bionetworks/synapsePythonClient'

0 commit comments

Comments
 (0)