Skip to content

Commit

Permalink
ci:bring back required dockerfiles for testing on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
henryborchers committed Nov 4, 2024
1 parent 88d6ef8 commit 4ad8b2e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ci/docker/python/linux/jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:latest
RUN --mount=type=cache,target=/var/cache/apt \
rm -f /etc/apt/apt.conf.d/docker-clean && \
apt-get update && \
apt-get install -yqq --no-install-recommends \
libdbus-1-3 \
libegl1 \
libgl1-mesa-glx \
libxkbcommon-x11-0 \
&& \
rm -rf /var/lib/apt/lists/*
53 changes: 53 additions & 0 deletions ci/docker/python/linux/tox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG PIP_DOWNLOAD_CACHE=/.cache/pip
ARG UV_CACHE_DIR=/.cache/uv
ARG UV_EXTRA_INDEX_URL

ARG PIPX_HOME=/pipx

FROM ubuntu:22.04 AS wheel_builder_base
COPY ci/docker/python/linux/tox/apt-packages.txt /tmp/
RUN apt-get update && \
apt-get install -y software-properties-common gpg-agent --no-install-recommends && \
add-apt-repository ppa:deadsnakes/ppa && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata && \
apt-get update && \
< /tmp/apt-packages.txt xargs apt-get install -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENV QT_QPA_PLATFORM="offscreen"

ARG PIP_EXTRA_INDEX_URL
ARG PIP_INDEX_URL

COPY requirements/ /tmp/python_requirements/requirements/
COPY requirements-dev.txt /tmp/python_requirements
ARG UV_EXTRA_INDEX_URL
ENV UV_INDEX_STRATEGY=unsafe-best-match
RUN --mount=type=cache,target=/.cache/python \
python3 -m pip install --cache-dir=/.cache/python/pip --upgrade pip && \
python3 -m pip install --cache-dir=/.cache/python/pip --upgrade uv && \
uv pip install --cache-dir=/.cache/python/uv --system -r /tmp/python_requirements/requirements-dev.txt tox-uv

ARG PIP_DOWNLOAD_CACHE
ARG UV_CACHE_DIR
RUN mkdir -p ${PIP_DOWNLOAD_CACHE} && \
chmod -R 777 ${PIP_DOWNLOAD_CACHE} && \
mkdir -p ${UV_CACHE_DIR} && \
chmod -R 777 ${UV_CACHE_DIR}

ARG PIPX_HOME
ENV PIPX_HOME=${PIPX_HOME}
ENV PIPX_BIN_DIR=${PIPX_HOME}/bin
RUN --mount=type=cache,target=/.cache/python \
python3 -m uv pip install --cache-dir=/.cache/python/uv --system --no-cache-dir pipx && \
pipx ensurepath && \
mkdir -p $PIPX_HOME && chmod -R 777 $PIPX_HOME

ARG UV_CACHE_DIR
ARG PIP_DOWNLOAD_CACHE
ENV UV_CACHE_DIR=${UV_CACHE_DIR}
ENV PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE}

WORKDIR /src
CMD ["tox", "--workdir", "/tmp/tox", "--recreate", "-p=auto"]
16 changes: 16 additions & 0 deletions ci/docker/python/linux/tox/apt-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
python3-pip
python3.9-dev
python3.9-venv
python3.9-distutils
python3.10-dev
python3.10-distutils
python3.10-venv
python3.11-dev
python3.11-distutils
python3.11-venv
libxml2-dev
libxslt-dev
libgl1-mesa-dev
xvfb
libxkbcommon-x11-0
x11-utils

0 comments on commit 4ad8b2e

Please sign in to comment.