Skip to content

Commit

Permalink
With GPU on fia
Browse files Browse the repository at this point in the history
  • Loading branch information
kleag committed Apr 30, 2024
1 parent 3b25313 commit 70d0227
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 51 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ jobs:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe install cppzmq:x64-windows
.\vcpkg.exe install qt:x64-windows
.\vcpkg.exe install boost:x64-windows
.\vcpkg.exe install qwt:x64-windows
.\vcpkg.exe install qt:x64-windows boost:x64-windows qwt:x64-windows
# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
Expand Down
48 changes: 2 additions & 46 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ do so.

Build dependencies:
- Tools: cmake, ninja, C++ (tested with gcc and clang), gawk, NLTK,
- Libraries and development packages for : boost , Qt5 and Qwt.
- Libraries and development packages for : boost , Qt6 and Qwt.

Optional dependencies:
- python3:
Expand All @@ -28,57 +28,14 @@ Named Entity Recognition and soon parsing too);

Under Ubuntu, most of these dependencies are installed with the following packages:
```
sudo apt-get clean && sudo apt-get update && sudo apt-get install -y -qq locales unzip bash \
coreutils apt-utils lsb-release git gcc g++ build-essential make cmake cmake-data \
curl python3-nltk gawk wget python3 python3-pip ninja-build qtbase5-dev-tools \
libqt5xmlpatterns5-dev libqt5qml5 qtdeclarative5-dev qml-module-qtquick-extras \
qml-module-qtquick-controls qml-module-qtquick-layouts qml-module-qtquick2 \
libtre-dev libboost-all-dev nodejs npm qml-module-qtquick-controls2 qml-module-qtquick-dialogs \
qml-module-qtquick-privatewidgets qml-module-qtquick-scene3d qml-module-qtquick-templates2 \
qml-module-qtquick-virtualkeyboard qml-module-qtquick-window2 qml-module-qtquick-xmllistmodel \
libicu-dev libeigen3-dev dos2unix python-is-python3 nvidia-cuda-toolkit nvidia-cudnn \
software-properties-common
```

Install python packages necessary to use the language resources install script:
```bash
pip3 install --user arpy requests tqdm
sudo apt-get update && apt-get install -y locales unzip bash coreutils apt-utils lsb-release git gcc g++ build-essential make cmake cmake-data curl python3-nltk gawk wget python3 python3-pip ninja-build qt6-base-dev qt6-base-dev-tools libqt6concurrent6 qml6-module-qtqml qt6-tools-dev libqt6concurrent6 qt6-base-dev-tools qt6-declarative-dev qt6-declarative-dev-tools qt6-multimedia-dev libtre-dev libboost-all-dev nodejs npm libicu-dev libeigen3-dev dos2unix python-is-python3 nvidia-cuda-toolkit nvidia-cudnn python3-arpy python3-requests python3-tqdm
```

qhttpserver can be downloaded and installed from
https://github.com/aymara/qhttpserver/releases

svmtool++ can be downloaded and installed from https://github.com/aymara/svmtool-cpp/releases

To compile SVMTool models, you also need svm_light:
```bash
mkdir svm_light && cd svm_light
wget http://osmot.cs.cornell.edu/svm_light/current/svm_light.tar.gz
tar xvzf svm_light.tar.gz
dos2unix *.c
cat<<EOF > svm_light.patch
--- svm_hideo.c.s 2021-12-16 11:34:23.606959575 +0000
+++ svm_hideo.c 2021-12-16 11:34:33.614829980 +0000
@@ -31,7 +31,7 @@
/* Common Block Declarations */
-long verbosity;
+extern long verbosity;
# define PRIMAL_OPTIMAL 1
# define DUAL_OPTIMAL 2
EOF
patch <svm_light.patch

make
sudo cp svm_classify svm_learn /usr/bin
```

For TensorFlow, we use a specially compiled version. It can be installed with
our ppa in Ubuntu versions starting from 18.04:

Expand All @@ -97,7 +54,6 @@ treebank corpus available for fair use in the NLTK data. To install, please
refer to http://nltk.org/data.html. Under Ubuntu this can be done like that:



```bash
npm install -g json
sudo sed -ie "s|DEFAULT_URL = 'http://nltk.googlecode.com/svn/trunk/nltk_data/index.xml'|DEFAULT_URL = 'http://nltk.github.com/nltk_data/'|" /usr/lib/python3/*/nltk/downloader.py
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/Dockerfile-ubuntu22.04-fia
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ARG USE_TENSORFLOW="false"
ARG CFLAGS=""
ARG CXXFLAGS=""
ARG TORCH_CUDA_ARCH_LIST="6.1"
ARG LIBTORCH_DL="download_libtorch.sh" # Use download_libtorch_gpu.sh for GPU build
ARG LIBTORCH_DL="download_libtorch_gpu.sh" # Use download_libtorch_gpu.sh for GPU build


RUN /bin/bash -c "if [ \"$USE_TENSORFLOW\" = true ] ; then apt-get install -y software-properties-common; add-apt-repository -y ppa:limapublisher/ppa; apt-get update; apt-get install -y libtensorflow-for-lima-dev ; fi"
Expand Down

0 comments on commit 70d0227

Please sign in to comment.