REP-1030 In addition to some python 2 => 3 fixes, this change bumps the scikit-learn version to latest. The previously pinned version of scikit-learn failed trying to compile all necessary C modules under python 3.7+ due to included header files that weren't compatible with C the API implemented in python 3.7+. Simultaneously, with the restrictive compatibility supported by scikit-learn, it seemed prudent to drop python 2 support altogether. Otherwise, we'd be stuck with python 3.4 as the newest possible version we could support. With this change, tests are currently passing under 3.9.2. Lastly, imports the original training data. At some point, a new version of the training data was committed to the repo but no classifier was trained from it. Using a classifier trained from this new data resulted in most of the tests failing.
21 lines
539 B
Docker
21 lines
539 B
Docker
FROM python:3.9-slim-buster AS deps
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y build-essential git curl python3-dev libatlas3-base libatlas-base-dev liblapack-dev libxml2 libxml2-dev libffi6 libffi-dev musl-dev libxslt-dev
|
|
|
|
FROM deps AS testable
|
|
ARG REPORT_PATH
|
|
|
|
VOLUME ["/var/mailgun", "/etc/mailgun/ssl", ${REPORT_PATH}]
|
|
|
|
ADD . /app
|
|
WORKDIR /app
|
|
COPY wheel/* /wheel/
|
|
|
|
RUN mkdir -p ${REPORT_PATH}
|
|
|
|
RUN python ./setup.py build bdist_wheel -d /wheel && \
|
|
pip install --no-deps /wheel/*
|
|
|
|
ENTRYPOINT ["/bin/sh", "/app/run_tests.sh"]
|