-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bmb/data-cleaning-prototype
- Loading branch information
Showing
335 changed files
with
7,310 additions
and
772 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,57 +3,57 @@ | |
# This Dockerfile is built as the `dimagi/commcarehq_base` image, which | ||
# is used for running tests. | ||
|
||
FROM python:3.9 | ||
FROM ghcr.io/astral-sh/uv:0.5.2-python3.9-bookworm-slim | ||
MAINTAINER Dimagi <[email protected]> | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONUSERBASE=/vendor \ | ||
PATH=/vendor/bin:$PATH \ | ||
NODE_VERSION=20.11.1 | ||
NODE_VERSION=20.11.1 \ | ||
UV_COMPILE_BYTECODE=1 \ | ||
UV_LINK_MODE=copy | ||
# UV_COMPILE_BYTECODE: Compile bytecode during installation to improve module | ||
# load performance. Also suppresses a couchdbkit syntax error that happens | ||
# during bytecode compilation. | ||
# UV_LINK_MODE: Copy from the cache instead of linking since it's a mounted volume | ||
|
||
RUN mkdir /vendor | ||
|
||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | ||
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | ||
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
default-jdk \ | ||
wget \ | ||
libxml2-dev \ | ||
libxmlsec1-dev \ | ||
libxmlsec1-openssl \ | ||
gettext | ||
|
||
# Install latest chrome dev package and fonts to support major | ||
# charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | ||
# Note: this installs the necessary libs to make the bundled version | ||
# of Chromium that Puppeteer installs, work. | ||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& apt-get install -y --no-install-recommends curl gnupg \ | ||
&& curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
google-chrome-unstable \ | ||
fonts-ipafont-gothic \ | ||
fonts-wqy-zenhei \ | ||
fonts-thai-tlwg \ | ||
fonts-kacst \ | ||
fonts-freefont-ttf | ||
build-essential \ | ||
bzip2 \ | ||
default-jre \ | ||
gettext \ | ||
git \ | ||
google-chrome-stable \ | ||
libmagic1 \ | ||
libpq-dev \ | ||
libxml2 \ | ||
libxmlsec1 \ | ||
libxmlsec1-openssl \ | ||
make \ | ||
&& rm -rf /var/lib/apt/lists/* /src/*.deb | ||
# build-essential allows uv to build uwsgi; increases image size by 240 MB | ||
# libpq-dev is for make-requirements-test.sh; increases image size by ~20 MB | ||
# libpq-dev can be replaced with libpq5 if pip-tools is replaced with uv in make-requirements-test.sh | ||
|
||
# Deletes all package sources, so don't apt-get install anything after this: | ||
RUN rm -rf /var/lib/apt/lists/* /src/*.deb | ||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | ||
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | ||
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" | ||
|
||
COPY requirements/test-requirements.txt package.json /vendor/ | ||
|
||
# prefer https for git checkouts made by pip | ||
RUN git config --global url."https://".insteadOf git:// \ | ||
&& pip install --upgrade pip \ | ||
&& pip install -r /vendor/test-requirements.txt --user --upgrade \ | ||
&& rm -rf /root/.cache/pip | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv venv --allow-existing /vendor \ | ||
&& uv pip install --prefix=/vendor -r /vendor/test-requirements.txt | ||
|
||
# this keeps the image size down, make sure to set in mocha-headless-chrome options | ||
# executablePath: 'google-chrome-unstable' | ||
# executablePath: 'google-chrome-stable' | ||
ENV PUPPETEER_SKIP_DOWNLOAD true | ||
|
||
RUN npm -g install \ | ||
|
@@ -67,3 +67,10 @@ RUN npm -g install \ | |
&& cd /vendor \ | ||
&& npm shrinkwrap \ | ||
&& yarn global add phantomjs-prebuilt | ||
|
||
# For backward compatibility with commcarehq_base image containing | ||
# google-chrome-unstable. Can be removed after all test jobs with Gruntfile.js | ||
# referencing google-chrome-unstable have completed (at least a few weeks or | ||
# months after the PR in which this was introduced is merged). Old PRs can be | ||
# updated to use google-chrome-stable by merging master into them. | ||
RUN ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome-unstable |
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
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
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
Oops, something went wrong.