-
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.
* Pre-release v2.0.0 - 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 - Update build_fuzzy_libmath_dockerfile script: * Update verificarlo version * Copy libraries into /opt/build-math/lib instead of /usr/local/lib to not conflict with existing library search path (LD_LIBRARY_PATH). - Update Github action versions
- Loading branch information
1 parent
f2018c2
commit c279ce2
Showing
18 changed files
with
274 additions
and
265 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
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"] |
Oops, something went wrong.