forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline docker usage (pandas-dev#49981)
* Streamline docker usage * Updated CI * newline * update python.pythonpath in devcontainer.json Co-authored-by: MarcoGorelli <>
- Loading branch information
Showing
4 changed files
with
21 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,13 @@ | ||
FROM quay.io/condaforge/mambaforge | ||
FROM python:3.10.8 | ||
WORKDIR /home/pandas | ||
|
||
# if you forked pandas, you can pass in your own GitHub username to use your fork | ||
# i.e. gh_username=myname | ||
ARG gh_username=pandas-dev | ||
ARG pandas_home="/home/pandas" | ||
RUN apt-get update && apt-get -y upgrade | ||
RUN apt-get install -y build-essential | ||
|
||
# Avoid warnings by switching to noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
# hdf5 needed for pytables installation | ||
RUN apt-get install -y libhdf5-dev | ||
|
||
# Configure apt and install packages | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils git tzdata dialog 2>&1 \ | ||
# | ||
# Configure timezone (fix for tests which try to read from "/etc/localtime") | ||
&& ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime \ | ||
&& dpkg-reconfigure -f noninteractive tzdata \ | ||
# | ||
# cleanup | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Switch back to dialog for any ad-hoc use of apt-get | ||
ENV DEBIAN_FRONTEND=dialog | ||
|
||
# Clone pandas repo | ||
RUN mkdir "$pandas_home" \ | ||
&& git clone "https://github.com/$gh_username/pandas.git" "$pandas_home" \ | ||
&& cd "$pandas_home" \ | ||
&& git remote add upstream "https://github.com/pandas-dev/pandas.git" \ | ||
&& git pull upstream main | ||
|
||
# Set up environment | ||
RUN mamba env create -f "$pandas_home/environment.yml" | ||
|
||
# Build C extensions and pandas | ||
SHELL ["mamba", "run", "--no-capture-output", "-n", "pandas-dev", "/bin/bash", "-c"] | ||
RUN cd "$pandas_home" \ | ||
&& export \ | ||
&& python setup.py build_ext -j 4 \ | ||
&& python -m pip install --no-build-isolation -e . | ||
RUN python -m pip install --upgrade pip | ||
RUN python -m pip install --use-deprecated=legacy-resolver \ | ||
-r https://raw.githubusercontent.com/pandas-dev/pandas/main/requirements-dev.txt | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters