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: docker/README.md
+27-3Lines changed: 27 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ Use `build_image.sh` script to build the docker images. The script builds the `p
44
44
|-bt, --buildtype|Which type of docker image to build. Can be one of : production, dev, ci|
45
45
|-t, --tag|Tag name for image. If not specified, script uses torchserve default tag names.|
46
46
|-cv, --cudaversion| Specify to cuda version to use. Supported values `cu92`, `cu101`, `cu102`, `cu111`, `cu113`, `cu116`, `cu117`, `cu118`. `cu121`, Default `cu121`|
47
+
|-rv, --rocmversion| Specify to rocm version to use. Supported values `rocm60`, `rocm61`, `rocm62`|
47
48
|-ipex, --build-with-ipex| Specify to build with intel_extension_for_pytorch. If not specified, script builds without intel_extension_for_pytorch.|
48
49
|-cpp, --build-cpp specify to build TorchServe CPP|
49
50
|-n, --nightly| Specify to build with TorchServe nightly.|
@@ -62,9 +63,9 @@ Creates a docker image with publicly available `torchserve` and `torch-model-arc
62
63
./build_image.sh
63
64
```
64
65
65
-
- To create a GPU based image with cuda 10.2. Options are `cu92`, `cu101`, `cu102`, `cu111`, `cu113`, `cu116`, `cu117`, `cu118`
66
+
- To create a GPU based image with cuda 10.2. Options are `cu92`, `cu101`, `cu102`, `cu111`, `cu113`, `cu116`, `cu117`, `cu118` for CUDA and `rocm60`, `rocm61`, `rocm62` for ROCm.
66
67
67
-
- GPU images are built with NVIDIA CUDA base image. If you want to use ONNX, please specify the base image as shown in the next section.
68
+
- GPU images are built with either NVIDIA CUDA base image amd AMD ROCm base image. If you want to use ONNX, please specify the base image as shown in the next section.
68
69
69
70
```bash
70
71
./build_image.sh -g -cv cu117
@@ -132,6 +133,24 @@ Creates a docker image with `torchserve` and `torch-model-archiver` installed fr
132
133
./build_image.sh -bt dev -g -cv cu92
133
134
```
134
135
136
+
- For creating GPU based image with rocm version 6.0:
137
+
138
+
```bash
139
+
./build_image.sh -bt dev -g -rv rocm60
140
+
```
141
+
142
+
- For creating GPU based image with rocm version 6.1:
143
+
144
+
```bash
145
+
./build_image.sh -bt dev -g -rv rocm61
146
+
```
147
+
148
+
- For creating GPU based image with rocm version 6.2:
149
+
150
+
```bash
151
+
./build_image.sh -bt dev -g -rv rocm62
152
+
```
153
+
135
154
- For creating GPU based image with a different branch:
136
155
137
156
```bash
@@ -164,7 +183,6 @@ Creates a docker image with `torchserve` and `torch-model-archiver` installed fr
164
183
./build_image.sh -bt dev -g [-cv cu121|cu118] -cpp
165
184
```
166
185
167
-
- For ROCm support (*experimental*), refer to [this documentation](../docs/hardware_support/amd_support.md).
168
186
169
187
## Start a container with a TorchServe image
170
188
@@ -204,6 +222,12 @@ For GPU latest image with gpu devices 1 and 2:
Copy file name to clipboardExpand all lines: docker/build_image.sh
+40-3Lines changed: 40 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ BASE_IMAGE="ubuntu:20.04"
11
11
UPDATE_BASE_IMAGE=false
12
12
USE_CUSTOM_TAG=false
13
13
CUDA_VERSION=""
14
+
ROCM_VERSION=""
14
15
USE_LOCAL_SERVE_FOLDER=false
15
16
BUILD_WITH_IPEX=false
16
17
BUILD_CPP=false
@@ -33,6 +34,7 @@ do
33
34
echo"-bi, --baseimage specify base docker image. Example: nvidia/cuda:11.7.0-cudnn8-runtime-ubuntu20.04 "
34
35
echo"-bt, --buildtype specify for type of created image. Possible values: production, dev, ci."
35
36
echo"-cv, --cudaversion specify to cuda version to use"
37
+
echo"-rv, --rocmversion spesify to rocm version to use"
36
38
echo"-t, --tag specify tag name for docker image"
37
39
echo"-lf, --use-local-serve-folder specify this option for the benchmark image if the current 'serve' folder should be used during automated benchmarks"
38
40
echo"-ipex, --build-with-ipex specify to build with intel_extension_for_pytorch"
@@ -167,6 +169,24 @@ do
167
169
shift
168
170
shift
169
171
;;
172
+
-rv|--rocmversion)
173
+
ROCM_VERSION="$2"
174
+
if [ "${ROCM_VERSION}"=="rocm60" ];
175
+
then
176
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.0.2"
177
+
elif [ "${ROCM_VERSION}"=="rocm61" ];
178
+
then
179
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.1.2"
180
+
elif [ "${ROCM_VERSION}"=="rocm62" ];
181
+
then
182
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.2.4"
183
+
else
184
+
echo"ROCM version not supported"
185
+
exit 1
186
+
fi
187
+
shift
188
+
shift
189
+
;;
170
190
esac
171
191
done
172
192
@@ -218,6 +238,23 @@ then
218
238
exit 1
219
239
fi
220
240
fi
241
+
242
+
if [[ "${MACHINE}"=="gpu"||"${ROCM_VERSION}"!="" ]];
243
+
then
244
+
if [ "${ROCM_VERSION}"=="rocm60" ];
245
+
then
246
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.0.2-complete"
247
+
elif [ "${ROCM_VERSION}"=="rocm61" ];
248
+
then
249
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.1.2-complete"
250
+
elif [ "${ROCM_VERSION}"=="rocm62" ];
251
+
then
252
+
BASE_IMAGE="rocm/dev-ubuntu-22.04:6.2.4-complete"
253
+
else
254
+
echo"ROCm version $ROCM_VERSION is not supported for CPP"
255
+
exit 1
256
+
fi
257
+
fi
221
258
fi
222
259
223
260
if [ "${BUILD_TYPE}"=="production" ];then
@@ -232,16 +269,16 @@ if [ "${BUILD_TYPE}" == "production" ]; then
Copy file name to clipboardExpand all lines: docs/hardware_support/amd_support.md
+2-16Lines changed: 2 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ TorchServe can be run on any combination of operating system and device that is
5
5
6
6
## Supported Versions of ROCm
7
7
8
-
The current stable `major.patch` version of ROCm and the previous path version will be supported. For example version `N.2` and `N.1` where `N` is the current major version.
8
+
The current stable `major.patch` version of ROCm and the previous patch version will be supported. For example version `N.2` and `N.1` where `N` is the current major version.
9
9
10
10
## Installation
11
11
@@ -35,7 +35,7 @@ The current stable `major.patch` version of ROCm and the previous path version w
35
35
- install the dependencies needed for ROCm support.
0 commit comments