Skip to content

Commit

Permalink
feat: remove avx flag from dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dsouza95 committed Feb 20, 2024
1 parent e4b4969 commit df04e0d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 55 deletions.
107 changes: 53 additions & 54 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ FROM ghcr.io/iarahealth/cuda:10.1-cudnn7-devel-ubuntu18.04

# Get basic packages
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
bash-completion \
build-essential \
ca-certificates \
cmake \
curl \
g++ \
gcc \
git \
libbz2-dev \
libboost-all-dev \
libgsm1-dev \
libopusfile0 \
libltdl-dev \
liblzma-dev \
libmagic-dev \
libpng-dev \
libsox-fmt-mp3 \
libsox-dev \
locales \
openjdk-8-jdk \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-wheel \
python3-numpy \
sox \
unzip \
wget \
zlib1g-dev
apt-utils \
bash-completion \
build-essential \
ca-certificates \
cmake \
curl \
g++ \
gcc \
git \
libbz2-dev \
libboost-all-dev \
libgsm1-dev \
libopusfile0 \
libltdl-dev \
liblzma-dev \
libmagic-dev \
libpng-dev \
libsox-fmt-mp3 \
libsox-dev \
locales \
openjdk-8-jdk \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-wheel \
python3-numpy \
sox \
unzip \
wget \
zlib1g-dev

RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
Expand Down Expand Up @@ -129,22 +129,21 @@ RUN ./configure
# Build STT

RUN bazel build \
--verbose_failures \
--workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" \
-c opt \
--copt=-mtune=generic \
--copt=-march=x86-64 \
--copt=-msse \
--copt=-msse2 \
--copt=-msse3 \
--copt=-msse4.1 \
--copt=-msse4.2 \
--copt=-mavx \
--config=noaws \
--config=nogcp \
--config=nohdfs \
--config=nonccl \
//native_client:libstt.so
--verbose_failures \
--workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" \
-c opt \
--copt=-mtune=generic \
--copt=-march=x86-64 \
--copt=-msse \
--copt=-msse2 \
--copt=-msse3 \
--copt=-msse4.1 \
--copt=-msse4.2 \
--config=noaws \
--config=nogcp \
--config=nohdfs \
--config=nonccl \
//native_client:libstt.so

# Copy built libs to /STT/native_client
RUN cp bazel-bin/native_client/libstt.so bazel-bin/native_client/libkenlm.so /STT/native_client/
Expand Down Expand Up @@ -174,13 +173,13 @@ ENV PYTHONIOENCODING UTF-8
# Build KenLM in /STT/native_client/kenlm folder
WORKDIR /STT/native_client
RUN rm -rf kenlm && \
git clone https://github.com/kpu/kenlm && \
cd kenlm && \
git checkout 87e85e66c99ceff1fab2500a7c60c01da7315eec && \
mkdir -p build && \
cd build && \
cmake .. && \
make -j $(nproc)
git clone https://github.com/kpu/kenlm && \
cd kenlm && \
git checkout 87e85e66c99ceff1fab2500a7c60c01da7315eec && \
mkdir -p build && \
cd build && \
cmake .. && \
make -j $(nproc)

# Done
WORKDIR /STT
2 changes: 1 addition & 1 deletion ci_scripts/tf-vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [ "${OS}" != "${CI_MSYS_VERSION}" ]; then
fi

if [ "${OS}" = "${CI_MSYS_VERSION}" ]; then
BAZEL_OPT_FLAGS=""
BAZEL_OPT_FLAGS="--copt=/arch:AVX"
elif [ "${OS}" = "Darwin" ]; then
FROM="$(uname | tr '[:upper:]' '[:lower:]')-$(uname -m)"
if [ "$SYSTEM_TARGET" = "host" ]; then
Expand Down

0 comments on commit df04e0d

Please sign in to comment.