<commit_before>FROM bohrium/manylinux:latest
MAINTAINER <NAME> <<EMAIL>>

# Copy bohrium source files from "context"
WORKDIR /bh
COPY . .

# Create a script `/bh/build.sh` that build and install Bohrium with the given python version
RUN echo "mkdir -p /bh/b\$1 && cd /bh/b\$1 && cmake .. -DCMAKE_BUILD_TYPE=Release -DCORE_LINK_FLAGS='-static-libgcc -static-libstdc++' -DBoost_USE_STATIC_LIBS=ON -DVE_OPENMP_COMPILER_OPENMP_SIMD=OFF -DCYTHON_OPENMP=OFF -DEXT_VISUALIZER=OFF -DVEM_PROXY=OFF -DCMAKE_INSTALL_PREFIX=/bh/i\$1 -DFORCE_CONFIG_PATH=/bh/i\$1 -DCBLAS_LIBRARIES=/usr/lib64/atlas/libcblas.so.3 -DCBLAS_INCLUDES=/usr/include -DLAPACKE_LIBRARIES=/usr/lib64/atlas/liblapack.so.3 -DLAPACKE_INCLUDE_DIR=/usr/include/openblas && make install" > /bh/build.sh

# Create a script `/bh/wheel.sh` that build a Python wheel of the given python version
RUN echo "cd /bh/b\$1 && python /bh/package/pip/create_wheel.py --npbackend-dir /bh/i\$1/lib64/python\$1/site-packages/bohrium/ --bh-install-prefix /bh/i\$1 --config /bh/i\$1/config.ini bdist_wheel \\" > /bh/wheel.sh
# Include BLAS/LAPACK
RUN echo "-L/usr/lib64/atlas/libatlas.so.3 -L/usr/lib64/atlas/libcblas.so.3 -L/usr/lib64/atlas/libf77blas.so.3 -L/usr/lib64/atlas/liblapack.so.3 \\" >> /bh/wheel.sh

# Build Bohrium with python2.7
ENV PATH /opt/python/cp27-cp27mu/bin/:$PATH
RUN bash /bh/build.sh 2.7
RUN bash /bh/wheel.sh 2.7
RUN pip install /bh/b2.7/dist/*

# Build Bohrium with python3.6
ENV PATH /opt/python/cp36-cp36m/bin/:$PATH
RUN bash /bh/build.sh 3.6
RUN bash /bh/wheel.sh 3.6
RUN pip install /bh/b3.6/dist/*

# Test Suite
WORKDIR /bh
RUN echo "#/usr/bin/env bash" > exec.sh && \
    echo "shopt -s extglob" >> exec.sh  && \
    chmod +x exec.sh

# Run the command in `EXEC`
ENTRYPOINT echo "$EXEC" >> exec.sh && sleep 1 && cat exec.sh && ./exec.sh
<commit_msg>pip: writing a deploy script<commit_after>FROM bohrium/manylinux:latest
MAINTAINER <NAME> <<EMAIL>>

# Copy bohrium source files from "context"
WORKDIR /bh
COPY . .

# Create a script `/bh/build.sh` that build and install Bohrium with the given python version
RUN echo "mkdir -p /bh/b\$1 && cd /bh/b\$1 && cmake .. -DCMAKE_BUILD_TYPE=Release -DCORE_LINK_FLAGS='-static-libgcc -static-libstdc++' -DBoost_USE_STATIC_LIBS=ON -DVE_OPENMP_COMPILER_OPENMP_SIMD=OFF -DCYTHON_OPENMP=OFF -DEXT_VISUALIZER=OFF -DVEM_PROXY=OFF -DCMAKE_INSTALL_PREFIX=/bh/i\$1 -DFORCE_CONFIG_PATH=/bh/i\$1 -DCBLAS_LIBRARIES=/usr/lib64/atlas/libcblas.so.3 -DCBLAS_INCLUDES=/usr/include -DLAPACKE_LIBRARIES=/usr/lib64/atlas/liblapack.so.3 -DLAPACKE_INCLUDE_DIR=/usr/include/openblas && make install" > /bh/build.sh

# Create a script `/bh/wheel.sh` that build a Python wheel of the given python version
RUN echo "cd /bh/b\$1 && python /bh/package/pip/create_wheel.py --npbackend-dir /bh/i\$1/lib64/python\$1/site-packages/bohrium/ --bh-install-prefix /bh/i\$1 --config /bh/i\$1/config.ini bdist_wheel \\" > /bh/wheel.sh
# Include BLAS/LAPACK
RUN echo "-L/usr/lib64/atlas/libatlas.so.3 -L/usr/lib64/atlas/libcblas.so.3 -L/usr/lib64/atlas/libf77blas.so.3 -L/usr/lib64/atlas/liblapack.so.3 \\" >> /bh/wheel.sh

# Build Bohrium with python2.7
ENV PATH /opt/python/cp27-cp27mu/bin/:$PATH
RUN bash /bh/build.sh 2.7
RUN bash /bh/wheel.sh 2.7
RUN pip install /bh/b2.7/dist/*

# Build Bohrium with python3.6
ENV PATH /opt/python/cp36-cp36m/bin/:$PATH
RUN bash /bh/build.sh 3.6
RUN bash /bh/wheel.sh 3.6
RUN pip install /bh/b3.6/dist/*

# Deploy script
WORKDIR /bh
RUN echo "#/usr/bin/env bash"          > deploy.sh && \
    echo "python2.7 -m twine upload /bh/b*/dist/*" >> deploy.sh && \
    chmod +x deploy.sh

# Execute script
WORKDIR /bh
RUN echo "#/usr/bin/env bash" > exec.sh && \
    echo "shopt -s extglob" >> exec.sh  && \
    chmod +x exec.sh

# Run the command in `EXEC`
ENTRYPOINT echo "$EXEC" >> exec.sh && sleep 1 && cat exec.sh && ./exec.sh

{'fraction_non_alphanumeric': 0.16006256517205422, 'fraction_numerical': 0.029718456725755994, 'mean_word_length': 3.482476635514019, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5614056', 'n_tokens_mistral': 1667, 'n_tokens_neox': 1554, 'n_words': 341}