Skip to content

Commit

Permalink
Update Dockerfile to use conda-forge compilers (pandas-dev#38219)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy authored Dec 2, 2020
1 parent 25ade6d commit a48957b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM continuumio/miniconda3
FROM quay.io/condaforge/miniforge3

# if you forked pandas, you can pass in your own GitHub username to use your fork
# i.e. gh_username=myname
Expand All @@ -15,10 +15,6 @@ RUN apt-get update \
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git iproute2 procps iproute2 lsb-release \
#
# Install C compilers (gcc not enough, so just went with build-essential which admittedly might be overkill),
# needed to build pandas C extensions
&& apt-get -y install build-essential \
#
# cleanup
&& apt-get autoremove -y \
&& apt-get clean -y \
Expand All @@ -39,9 +35,14 @@ RUN mkdir "$pandas_home" \
# we just update the base/root one from the 'environment.yml' file instead of creating a new one.
#
# Set up environment
RUN conda env update -n base -f "$pandas_home/environment.yml"
RUN conda install -y mamba
RUN mamba env update -n base -f "$pandas_home/environment.yml"

# Build C extensions and pandas
RUN cd "$pandas_home" \
SHELL ["/bin/bash", "-c"]
RUN . /opt/conda/etc/profile.d/conda.sh \
&& conda activate base \
&& cd "$pandas_home" \
&& export \
&& python setup.py build_ext -j 4 \
&& python -m pip install -e .

0 comments on commit a48957b

Please sign in to comment.