Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
Use pre-built binaries again in create-venv
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed May 22, 2019
1 parent 7d46978 commit 87d6076
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions create-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bash download-dependencies.sh "${CPU_ARCH}"
# -----------------------------------------------------------------------------

case $CPU_ARCH in
armv7l|arm64v8)
x86_64|armv7l|arm64v8)
# Use pre-built packages
openfst_file="${download_dir}/openfst_1.6.9-1_${FRIENDLY_ARCH}.deb"
echo "Installing OpenFST (${openfst_file})"
Expand Down Expand Up @@ -117,9 +117,6 @@ source "${VENV_PATH}/bin/activate"

case $CPU_ARCH in
armv7l|arm64v8)
# Force newer openfst
"${PYTHON}" -m pip install 'openfst==1.6.9'

# Exclude flair
grep -v flair requirements.txt > "${temp_dir}/requirements-noflair.txt"
"${PYTHON}" -m pip install -r "${temp_dir}/requirements-noflair.txt"
Expand Down Expand Up @@ -181,7 +178,7 @@ fi

if [[ -z "$(which ngramcount)" ]]; then
case $CPU_ARCH in
armv7l|arm64v8)
x86_64|armv7l|arm64v8)
# Use pre-built packages
opengrm_file="${download_dir}/opengrm_1.3.4-1_${FRIENDLY_ARCH}.deb"
echo "Installing opengrm (${opengrm_file})"
Expand Down Expand Up @@ -229,6 +226,30 @@ fi
# Add /usr/local/lib to LD_LIBRARY_PATH
sudo ldconfig

# -----------------------------------------------------------------------------
# NodeJS / Yarn
# -----------------------------------------------------------------------------

if [[ -z "$(which node)" ]]; then
echo "Installing nodejs"
sudo apt-get install -y nodejs
fi

if [[ -z "$(which yarn)" ]]; then
echo "Installing yarn"
curl -o- -L https://yarnpkg.com/install.sh | bash

# Need to re-source .bashrc so yarn is in the path
source "${HOME}/.bashrc"
fi

# -----------------------------------------------------------------------------
# Web Interface
# -----------------------------------------------------------------------------

echo "Building web interface"
cd "${DIR}" && yarn && yarn build

# -----------------------------------------------------------------------------

echo "Done"

0 comments on commit 87d6076

Please sign in to comment.