You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: cpp/README.md
+19-1
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,24 @@
4
4
* GCC version: gcc-9
5
5
* cmake version: 3.18+
6
6
* Linux
7
+
8
+
For convenience, a docker container can be used as the development environment to build and install Torchserve CPP
9
+
```
10
+
cd serve/docker
11
+
# For CPU support
12
+
./build_image.sh -bt dev -cpp
13
+
# For GPU support
14
+
./build_image.sh -bt dev -g [-cv cu121|cu118] -cpp
15
+
```
16
+
17
+
Start the container and optionally bind mount a build directory into the container to persist build artifacts across container runs
18
+
```
19
+
# For CPU support
20
+
docker run [-v /path/to/build/dir:/serve/cpp/_build] -it pytorch/torchserve:cpp-dev-cpu /bin/bash
21
+
# For GPU support
22
+
docker run --gpus all [-v /path/to/build/dir:/serve/cpp/_build] -it pytorch/torchserve:cpp-dev-gpu /bin/bash
23
+
```
24
+
7
25
## Installation and Running TorchServe CPP
8
26
This installation instruction assumes that TorchServe is already installed through pip/conda/source. If this is not the case install it after the `Install dependencies` step through your preferred method.
0 commit comments