/
githubmirror
/
pandas
Обзор
Документация
Войти
/
githubmirror
/
pandas
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v2.2.0.dev0
gitpod/gitpod.Dockerfile
48 строк
2 KB
Joris Van den Bossche
DEV: update gitpod to give user cache write permissions (fix pre-commit) (#52700)
18 апр 2023, 01:15
Не верифицирован
18 апр 2023, 01:15
de0753e
Код
Авторство
О чём код?
# Doing a local shallow clone - keeps the container secure # and much slimmer than using COPY directly or making a # remote clone ARG BASE_CONTAINER="pandas/pandas-dev:latest" FROM gitpod/workspace-base:latest as clone # the clone should be deep enough for versioneer to work RUN git clone https://github.com/pandas-dev/pandas --depth 12 /tmp/pandas # ----------------------------------------------------------------------------- # Using the pandas-dev Docker image as a base # This way, we ensure we have all the needed compilers and dependencies # while reducing the build time FROM ${BASE_CONTAINER} as build # ----------------------------------------------------------------------------- USER root # ----------------------------------------------------------------------------- # ---- ENV variables ---- # ---- Directories needed ---- ENV WORKSPACE=/workspace/pandas/ \ CONDA_ENV=pandas-dev # Allows this micromamba.Dockerfile to activate conda environments SHELL ["/bin/bash", "--login", "-o", "pipefail", "-c"] # Copy over the shallow clone COPY --from=clone --chown=gitpod /tmp/pandas ${WORKSPACE} # Everything happens in the /workspace/pandas directory WORKDIR ${WORKSPACE} # Build pandas to populate the cache used by ccache RUN git config --global --add safe.directory /workspace/pandas RUN conda activate ${CONDA_ENV} && \ python -m pip install -e . --no-build-isolation && \ python setup.py build_ext --inplace && \ ccache -s # Gitpod will load the repository into /workspace/pandas. We remove the # directory from the image to prevent conflicts RUN rm -rf ${WORKSPACE} # ----------------------------------------------------------------------------- # Always return to non privileged user RUN chown -R gitpod:gitpod /home/gitpod/.cache/ USER gitpod