Skip to content

Commit a48957b

Browse files
authored
Update Dockerfile to use conda-forge compilers (pandas-dev#38219)
1 parent 25ade6d commit a48957b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM continuumio/miniconda3
1+
FROM quay.io/condaforge/miniforge3
22

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

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

0 commit comments

Comments
 (0)