-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add libtorch (#131) * add libtorch * update libtorch 1.6.0 -> 1.8.1 * libtorch for CUDA 11.1 * use the same command * libtorch 1.8.1 -> 1.6.0 * add LibTorch for CUDA 11.1 * change install order * Deprecate 18.04 support for libtorch Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * pre-commit fixes Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> Co-authored-by: Yusuke Muramatsu <yukke42@users.noreply.github.com>
- Loading branch information
1 parent
9bd45b2
commit dbaa436
Showing
3 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
cuda_version: "11.1" |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# for Ubuntu 20.04 / CUDA 11.1 | ||
- name: LibTorch (download) | ||
when: cuda_version == '11.1' | ||
become: yes | ||
command: gdown https://drive.google.com/u/0/uc?id=1eNh3F3xCQ4AMJEHtwb1dhshSyzWMjoc8 -O /tmp/libtorch.zip | ||
- name: LibTorch (unarchive) | ||
when: cuda_version == '11.1' | ||
become: yes | ||
unarchive: | ||
src: /tmp/libtorch.zip | ||
dest: /usr/local | ||
- name: LibTorch (install OpenMP) | ||
become: yes | ||
apt: | ||
name: | ||
- libgomp1 | ||
update_cache: yes | ||
- name: LibTorch (replace a library file) | ||
become: yes | ||
command: cp /usr/lib/x86_64-linux-gnu/libgomp.so.1 /usr/local/libtorch/lib/libgomp-75eea7e8.so.1 | ||
- name: LibTorch (add library >> bashrc) | ||
become: no | ||
lineinfile: | ||
dest: ~/.bashrc | ||
line: export LD_LIBRARY_PATH="/usr/local/libtorch/lib:$LD_LIBRARY_PATH" | ||
state: present | ||
# ref: https://discuss.pytorch.org/t/libtorch-code-integration-failed-with-error-version-gomp-4-5-not-found/119545 | ||
# ref: https://github.com/pytorch/pytorch/issues/643#issuecomment-294269589 |