Skip to content

Commit 5c40b4d

Browse files
committed
updated docker files after local testing
1 parent ef618f7 commit 5c40b4d

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

gitpod/Dockerfile

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#
2-
# Dockerfile for pandas development
2+
# micromamba.Dockerfile for pandas development
33
#
44
# Usage:
55
# -------
66
#
77
# To make a local build of the container, from the 'Docker-dev' directory:
8-
# docker build --rm -f "Dockerfile" -t <build-tag> "."
8+
# docker build --rm -f "micromamba.Dockerfile" -t <build-tag> "."
99
#
1010
# To use the container use the following command. It assumes that you are in
1111
# the root folder of the pandas git repository, making it available as
@@ -38,7 +38,6 @@ ENV CONDA_DIR=/home/gitpod/mambaforge3 \
3838
ENV PATH=${CONDA_DIR}/bin:$PATH \
3939
WORKSPACE=/workspace/pandas
4040

41-
4241
# -----------------------------------------------------------------------------
4342
# ---- Creating as root - note: make sure to change to gitpod in the end ----
4443
USER root
@@ -84,15 +83,12 @@ COPY ./gitpod/workspace_config /usr/local/bin/workspace_config
8483
RUN chmod a+rx /usr/local/bin/workspace_config && \
8584
workspace_config
8685

87-
# Copy conda environment file into the container - this needs to exists inside
8886
# the container to create a conda environment from it
8987
COPY environment.yml /tmp/environment.yml
9088

91-
# -----------------------------------------------------------------------------
92-
# ---- Create conda environment ----
93-
# Install pandas dependencies
9489
RUN mamba env create -f /tmp/environment.yml
95-
RUN conda activate ${CONDA_ENV} && \
90+
# ---- Create conda environment ----
91+
RUN conda activate $CONDA_ENV && \
9692
mamba install ccache -y && \
9793
# needed for docs rendering later on
9894
python -m pip install --no-cache-dir sphinx-autobuild && \

gitpod/gitpod.Dockerfile

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Doing a local shallow clone - keeps the container secure
22
# and much slimmer than using COPY directly or making a
33
# remote clone
4-
ARG BASE_CONTAINER="pandas/pandas-dev:latest"
4+
ARG BASE_CONTAINER="pythonpandas/pandas-dev:latest"
55
FROM gitpod/workspace-base:latest as clone
66

7-
COPY --chown=gitpod . /tmp/pandas_repo
8-
97
# the clone should be deep enough for versioneer to work
10-
RUN git clone --shallow-since=2022-01-01 file:////tmp/pandas_repo /tmp/pandas
8+
RUN git clone https://github.com/pandas-dev/pandas --depth 12 /tmp/pandas
119

1210
# -----------------------------------------------------------------------------
1311
# Using the pandas-dev Docker image as a base
@@ -24,7 +22,7 @@ USER root
2422
ENV WORKSPACE=/workspace/pandas/ \
2523
CONDA_ENV=pandas-dev
2624

27-
# Allows this Dockerfile to activate conda environments
25+
# Allows this micromamba.Dockerfile to activate conda environments
2826
SHELL ["/bin/bash", "--login", "-o", "pipefail", "-c"]
2927

3028
# Copy over the shallow clone
@@ -35,8 +33,6 @@ WORKDIR ${WORKSPACE}
3533

3634
# Build pandas to populate the cache used by ccache
3735
RUN git config --global --add safe.directory /workspace/pandas
38-
# chained RUN failed to activate. trying separate run commands
39-
RUN git submodule update --init --depth=1 -- pandas/core/src/umath/svml
4036
RUN conda activate ${CONDA_ENV} && \
4137
python setup.py build_ext --inplace && \
4238
ccache -s

0 commit comments

Comments
 (0)