-
download cuda-specific libtorch (2.3.1 with cuda 11.8)
$ wget https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.3.1%2Bcu118.zip
-
download typhoon-blade, which is the latest version
$ git clone git@github.com:anqin/blade-build.git
-
download the GPU docker
$ docker pull registry.cn-hangzhou.aliyuncs.com/anqindev/ubuntu22-dev:ubuntu22-tf2.15-dev1
-
download cuda-specific libtorch (2.3.1 with cuda 11.8)
$ wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.3.1%2Bcpu.zip
-
download typhoon-blade, which is the v2.0-alpha
$ git clone -b v2.0-alpha git@github.com:anqin/blade-build.git
-
download the GPU docker
$ docker pull registry.cn-hangzhou.aliyuncs.com/anqindev/ubuntu22-dev:
-
path tree would be:
copy the BUILD.libtorh (for GPU or CPU) to corrent dir:
pytorch_gpu_dev |- BLADE_ROOT |- BUILD |- .cpp/.h |- libtorch_cpu |- BUILD |- |- libtorch_gpu |- BUILD |-
-
mount the dirs to docker image
-
build the codes
$ blade build ...
-
run the example codes
$ export LD_LIBRARY_PATH=<path/to/libtorch/lib64> $ ./mnist_sample_main $ ./load_model_main net.pt