-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update numpy version from 1.22.0 to 1.22.4 - Update sklearn version from 1.0.2 to 1.3.2 - Refactore docker images - Add test for scikit-learn
- Loading branch information
1 parent
f2018c2
commit cadbf0d
Showing
15 changed files
with
226 additions
and
232 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
49 changes: 24 additions & 25 deletions
49
docker/base/ubuntu-20.04/Dockerfile.ubuntu-20.04-1-python
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 |
---|---|---|
@@ -1,31 +1,30 @@ | ||
ARG VERIFICARLO_VERSION=v0.9.1 | ||
FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack | ||
ARG ORG=verificarlo | ||
ARG VERIFICARLO_VERSION=v2.0.0 | ||
FROM ${ORG}/fuzzy:${VERIFICARLO_VERSION}-lapack | ||
|
||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE | ||
|
||
# Remove any existing python packages | ||
RUN apt -y -qqq remove python3 | ||
ARG PYTHON_VERSION=3.8.5 | ||
|
||
## Build Python 3.8.5 from source and the associated pip | ||
RUN cd /opt/build/ && \ | ||
wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz && \ | ||
tar xvf Python-3.8.5.tgz && \ | ||
cd Python-3.8.5 && \ | ||
LDFLAGS="--conservative --exclude-file=/tmp/python-vfc-exclude.txt" \ | ||
CFLAGS="--conservative --exclude-file=/tmp/python-vfc-exclude.txt" \ | ||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE && \ | ||
# Remove any existing python packages | ||
apt -y -qqq remove python3 && \ | ||
# Build Python from source and the associated pip | ||
cd /opt/build/ && \ | ||
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \ | ||
tar xvf Python-${PYTHON_VERSION}.tgz && \ | ||
cd Python-${PYTHON_VERSION} && \ | ||
LDFLAGS="--exclude-file=/tmp/python-vfc-exclude.txt" \ | ||
CFLAGS="--exclude-file=/tmp/python-vfc-exclude.txt" \ | ||
LDSHARED='verificarlo-c -shared' \ | ||
./configure --with-ensurepip=install &&\ | ||
make -j $(nproc) &&\ | ||
make install &&\ | ||
wget https://bootstrap.pypa.io/get-pip.py &&\ | ||
python3 get-pip.py | ||
|
||
# Remove temporary files | ||
RUN rm -rf /opt/build/* | ||
|
||
# Restore default MCA mode | ||
RUN echo "libinterflop_mca_int.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
./configure --with-ensurepip=install && \ | ||
make -j $(nproc) && \ | ||
make install && \ | ||
wget https://bootstrap.pypa.io/get-pip.py && \ | ||
python3 get-pip.py && \ | ||
# Remove temporary files | ||
rm -rf /opt/build/* && \ | ||
# Restore default MCA mode | ||
echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
|
||
# Set entrypoint | ||
ENTRYPOINT [ "/bin/bash"] |
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 |
---|---|---|
@@ -1,34 +1,33 @@ | ||
ARG VERIFICARLO_VERSION=v0.9.1 | ||
FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5 | ||
ARG ORG=verificarlo | ||
ARG VERIFICARLO_VERSION=v2.0.0 | ||
FROM ${ORG}/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5 | ||
|
||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE | ||
ARG NUMPY_VERSION=1.22.4 | ||
|
||
# Copy verificarlo's exclusion file for Python 3 | ||
COPY docker/resources/numpy-vfc-exclude.txt /tmp/numpy-vfc-exclude.txt | ||
COPY docker/resources/numpy-sanity-check.py /tmp/numpy-sanity-check.py | ||
|
||
# Build numpy from sources and link with the local BLAS and LAPACK | ||
RUN python3 -m pip install cython | ||
|
||
RUN cd /opt/build/ &&\ | ||
wget https://github.com/numpy/numpy/releases/download/v1.22.0/numpy-1.22.0.tar.gz &&\ | ||
tar xvf numpy-1.22.0.tar.gz &&\ | ||
cd numpy-1.22.0 &&\ | ||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE && \ | ||
# Build numpy from sources and link with the local BLAS and LAPACK | ||
python3 -m pip install cython==0.29.30 && \ | ||
cd /opt/build/ &&\ | ||
wget https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz &&\ | ||
tar xvf numpy-${NUMPY_VERSION}.tar.gz &&\ | ||
cd numpy-${NUMPY_VERSION} &&\ | ||
CC="verificarlo-c" FC="verificarlo-f" CXX="verificarlo-c++" LDSHARED='verificarlo-c -shared' \ | ||
CFLAGS="--conservative --exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
LDFLAGS="--conservative --exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
python3 setup.py build -j $(nproc) --disable-optimization install | ||
|
||
|
||
# Smoked test for vectorization. | ||
# We should run the full numpy test suit in next versions | ||
RUN python3 /tmp/numpy-sanity-check.py | ||
|
||
# Remove temporary files | ||
RUN rm -rf /opt/build/* | ||
|
||
# Restore default MCA mode | ||
RUN echo "libinterflop_mca_int.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
CFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
FCFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
CXXFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
LDFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
python3 setup.py build -j $(nproc) --disable-optimization install && \ | ||
# Smoked test for vectorization. | ||
# We should run the full numpy test suit in next versions | ||
cd && python3 /tmp/numpy-sanity-check.py && \ | ||
# Remove temporary files | ||
rm -rf /opt/build/* && \ | ||
# Restore default MCA mode | ||
echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
|
||
ENTRYPOINT [ "/bin/bash"] |
49 changes: 24 additions & 25 deletions
49
docker/base/ubuntu-20.04/Dockerfile.ubuntu-20.04-2-numpy-only
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 |
---|---|---|
@@ -1,34 +1,33 @@ | ||
ARG VERIFICARLO_VERSION=v0.9.1 | ||
FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack | ||
ARG ORG=verificarlo | ||
ARG VERIFICARLO_VERSION=v2.0.0 | ||
FROM ${ORG}/fuzzy:${VERIFICARLO_VERSION}-lapack | ||
|
||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE | ||
ARG NUMPY_VERSION=1.22.4 | ||
|
||
# Copy verificarlo's exclusion file for Python 3 | ||
COPY docker/resources/numpy-vfc-exclude.txt /tmp/numpy-vfc-exclude.txt | ||
COPY docker/resources/numpy-sanity-check.py /tmp/numpy-sanity-check.py | ||
|
||
# Build numpy from sources and link with the local BLAS and LAPACK | ||
RUN python3 -m pip install --upgrade pip && python3 -m pip install --ignore-installed cython==0.29.24 | ||
|
||
RUN cd /opt/build/ &&\ | ||
wget https://github.com/numpy/numpy/releases/download/v1.22.0/numpy-1.22.0.tar.gz &&\ | ||
tar xvf numpy-1.22.0.tar.gz &&\ | ||
cd numpy-1.22.0 &&\ | ||
# Use IEEE mode for compiling with verificarlo | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE && \ | ||
# Build numpy from sources and link with the local BLAS and LAPACK | ||
python3 -m pip install cython==0.29.30 && \ | ||
cd /opt/build/ &&\ | ||
wget https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz &&\ | ||
tar xvf numpy-${NUMPY_VERSION}.tar.gz &&\ | ||
cd numpy-${NUMPY_VERSION} &&\ | ||
CC="verificarlo-c" FC="verificarlo-f" CXX="verificarlo-c++" LDSHARED='verificarlo-c -shared' \ | ||
CFLAGS="--conservative --exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
LDFLAGS="--conservative --exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
python3 setup.py build -j $(nproc) --disable-optimization install | ||
|
||
|
||
# Smoked test for vectorization. | ||
# We should run the full numpy test suit in next versions | ||
RUN python3 /tmp/numpy-sanity-check.py | ||
|
||
# Remove temporary files | ||
RUN rm -rf /opt/build/* | ||
|
||
# Restore default MCA mode | ||
RUN echo "libinterflop_mca_int.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
CFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
FCFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
CXXFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
LDFLAGS="--exclude-file=/tmp/numpy-vfc-exclude.txt -Wunused-command-line-argument" \ | ||
python3 setup.py build -j $(nproc) --disable-optimization install && \ | ||
# Smoked test for vectorization. | ||
# We should run the full numpy test suit in next versions | ||
cd && python3 /tmp/numpy-sanity-check.py && \ | ||
# Remove temporary files | ||
rm -rf /opt/build/* && \ | ||
# Restore default MCA mode | ||
echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
|
||
ENTRYPOINT [ "/bin/bash"] |
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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
ARG VERIFICARLO_VERSION=v0.9.1 | ||
FROM verificarlo/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5-numpy | ||
ARG ORG=verificarlo | ||
ARG VERIFICARLO_VERSION=v2.0.0 | ||
FROM ${ORG}/fuzzy:${VERIFICARLO_VERSION}-lapack-python3.8.5-numpy | ||
|
||
# Load backend IEEE | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE | ||
ARG SCIPY_VERSION=1.7.3 | ||
|
||
# Copy sanity check for SciPy | ||
COPY docker/resources/numpy-sanity-check.py /tmp/scipy-sanity-check.py | ||
|
||
# Install SciPy dependencies | ||
RUN pip3 install joblib pythran pybind11 | ||
# Replace gfortran with verificarlo-f | ||
RUN cp /usr/local/bin/verificarlo-f /usr/bin/gfortran | ||
|
||
# Remove debug flag which makes flag crash | ||
RUN sed -i "302s/.*/ llvm_options = llvm_options.replace(\"'-g'\",'') if \"'-g'\" in llvm_options else llvm_options/" $(which verificarlo) | ||
|
||
RUN cd /opt/build/ &&\ | ||
wget https://github.com/scipy/scipy/releases/download/v1.7.3/scipy-1.7.3.tar.gz &&\ | ||
tar xvf scipy-1.7.3.tar.gz &&\ | ||
cd scipy-1.7.3 &&\ | ||
CC="verificarlo-c" FC="verificarlo-f" CXX="verificarlo-c++" LDSHARED='verificarlo-c -shared' \ | ||
CFLAGS="--conservative -Wunused-command-line-argument" \ | ||
LDFLAGS="--conservative -Wunused-command-line-argument" \ | ||
python3 setup.py build --disable-optimization -j $(nproc) install | ||
COPY docker/resources/scipy-sanity-check.py /tmp/ | ||
|
||
# Restore original verificarlo | ||
RUN sed -i "302s/ llvm_options = llvm_options.replace(\"'-g'\",'') if \"'-g'\" in llvm_options else llvm_options//" $(which verificarlo) | ||
|
||
# Sanity check | ||
RUN python3 /tmp/scipy-sanity-check.py | ||
|
||
# Remove temporary files | ||
RUN rm -rf /opt/build/* | ||
# Load backend IEEE | ||
RUN echo "libinterflop_ieee.so" > $VFC_BACKENDS_FROM_FILE && \ | ||
# Install SciPy dependencies | ||
pip3 install joblib pythran pybind11 && \ | ||
# Replace gfortran with verificarlo-f | ||
cp /usr/local/bin/verificarlo-f /usr/bin/gfortran && \ | ||
# Remove debug flag which makes compilation crash | ||
sed -i "397s/.*/ llvm_options = llvm_options.replace(\"'-g'\",'') if \"'-g'\" in llvm_options else llvm_options/" $(which verificarlo) && \ | ||
cd /opt/build/ &&\ | ||
wget https://github.com/scipy/scipy/releases/download/v${SCIPY_VERSION}/scipy-${SCIPY_VERSION}.tar.gz &&\ | ||
tar xvf scipy-${SCIPY_VERSION}.tar.gz &&\ | ||
cd scipy-${SCIPY_VERSION} &&\ | ||
CC="verificarlo-c" FC="verificarlo-f" CXX="verificarlo-c++" \ | ||
LDSHARED='verificarlo-c -shared' \ | ||
CFLAGS="-Wunused-command-line-argument" \ | ||
CXXFLAGS="-Wunused-command-line-argument" \ | ||
FCFLAGS="-Wunused-command-line-argument" \ | ||
LDFLAGS="-Wunused-command-line-argument" \ | ||
python3 setup.py build --disable-optimization -j $(nproc) install && \ | ||
# Restore original verificarlo | ||
sed -i "397s/ llvm_options = llvm_options.replace(\"'-g'\",'') if \"'-g'\" in llvm_options else llvm_options//" $(which verificarlo) && \ | ||
# Set default MCA mode | ||
echo "libinterflop_mca.so -m rr" > $VFC_BACKENDS_FROM_FILE && \ | ||
# Sanity check | ||
cd && python3 /tmp/scipy-sanity-check.py && \ | ||
rm -rf /opt/build/* | ||
|
||
# Restore default behavior for verificarlo's CC | ||
ENV CC "verificarlo-c" | ||
RUN echo "libinterflop_mca_int.so -m rr" > $VFC_BACKENDS_FROM_FILE | ||
|
||
ENTRYPOINT [ "/bin/bash"] |
Oops, something went wrong.