-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yaml
209 lines (208 loc) · 9.75 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include:
- path:
- ../python/docker-compose.yaml
services:
ipex-base:
build:
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ""
BASE_IMAGE_NAME: ${BASE_IMAGE_NAME:-ubuntu}
BASE_IMAGE_TAG: ${BASE_IMAGE_TAG:-22.04}
GITHUB_RUN_NUMBER: ${GITHUB_RUN_NUMBER:-0}
IPEX_VERSION: ${IPEX_VERSION:-2.4.0}
MINIFORGE_VERSION: ${MINIFORGE_VERSION:-Linux-x86_64}
NO_PROXY: ''
PACKAGE_OPTION: ${PACKAGE_OPTION:-pip}
PYTHON_VERSION: ${PYTHON_VERSION:-3.10}
PYTORCH_VERSION: ${PYTORCH_VERSION:-2.4.0+cpu}
REGISTRY: ${REGISTRY}
REPO: ${REPO}
TORCHAUDIO_VERSION: ${TORCHAUDIO_VERSION:-2.4.0}
TORCHVISION_VERSION: ${TORCHVISION_VERSION:-0.19.0}
context: .
labels:
dependency.python: ${PYTHON_VERSION:-3.10}
dependency.python.pip: requirements.txt
docs: pytorch
org.opencontainers.base.name: "intel/python:3.10-core"
org.opencontainers.image.name: "intel/intel-optimized-pytorch"
org.opencontainers.image.title: "Intel® Extension for PyTorch Base Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base
target: ipex-base-${PACKAGE_OPTION:-pip}
command: >
sh -c "python -c 'import torch; import intel_extension_for_pytorch as ipex; print(\"torch:\", torch.__version__, \" ipex:\",ipex.__version__)'"
depends_on:
- ${PACKAGE_OPTION:-pip}
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-base
pull_policy: always
jupyter:
build:
labels:
dependency.python.pip: jupyter-requirements.txt
org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base"
org.opencontainers.image.title: "Intel® Extension for PyTorch Jupyter Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-jupyter
target: jupyter
command: >
bash -c "python -m jupyter --version"
environment:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-jupyter
network_mode: host
ports:
- 8888:8888
multinode:
build:
labels:
dependency.apt.gcc: true
dependency.apt.libgl1-mesa-glx: true
dependency.apt.libglib2: true
dependency.apt.python3-dev: true
dependency.pip.apt.virtualenv: true
dependency.pip.deepspeed: 0.14.4
dependency.python.pip: multinode/requirements.txt
org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-base"
org.opencontainers.image.title: "Intel® Extension for PyTorch MultiNode Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode
target: multinode
command: >
bash -c "python -c 'import neural_compressor;import oneccl_bindings_for_pytorch as oneccl;import deepspeed;
print(\"Neural Compressor:\", neural_compressor.__version__,
\"\\nOneCCL:\", oneccl.__version__,
\"\\nDeepspeed:\", deepspeed.__version__)'"
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-oneccl-inc-${INC_VERSION:-3.0}
shm_size: 2gb
xpu:
build:
args:
ICD_VER: ${ICD_VER:-24.26.30049.10-950~22.04}
LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.17.6-950~22.04}
LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.30049.10-950~22.04}
LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.17.6-950~22.04}
NO_PROXY: ''
PACKAGE_OPTION: ${PACKAGE_OPTION:-pip}
labels:
dependency.apt.build-essential: true
dependency.apt.clinfo: true
dependency.apt.git: true
dependency.apt.gnupg2: true
dependency.apt.gpg-agent: true
dependency.apt.intel-level-zero-gpu: ${LEVEL_ZERO_GPU_VER:-1.3.30049.10-950~22.04}
dependency.apt.intel-opencl-icd: ${ICD_VER:-24.26.30049.10-950~22.04}
dependency.apt.level-zero: ${LEVEL_ZERO_VER:-1.17.6-950~22.04}
dependency.apt.level-zero-dev: ${LEVEL_ZERO_DEV_VER:-1.17.6-950~22.04}
dependency.apt.rsync: true
dependency.apt.unzip: true
dependency.idp.pip: false
org.opencontainers.base.name: "intel/python:3.10-core"
org.opencontainers.image.title: "Intel® Extension for PyTorch XPU Base Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.3.110}-xpu-${PACKAGE_OPTION:-pip}-base
target: ipex-xpu-base-wheels-${PACKAGE_OPTION:-pip}
command: >
python -c "import torch;print(torch.device('xpu'));import
intel_extension_for_pytorch as
ipex;print(torch.xpu.has_xpu());print(torch.__version__);
print(ipex.__version__); [print(f'[{i}]:
{torch.xpu.get_device_properties(i)}') for i in
range(torch.xpu.device_count())];"
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.110xpu}-xpu-base
xpu-jupyter:
build:
args:
ICD_VER: ${ICD_VER:-24.26.30049.10-950~22.04}
LEVEL_ZERO_DEV_VER: ${LEVEL_ZERO_DEV_VER:-1.17.6-950~22.04}
LEVEL_ZERO_GPU_VER: ${LEVEL_ZERO_GPU_VER:-1.3.30049.10-950~22.04}
LEVEL_ZERO_VER: ${LEVEL_ZERO_VER:-1.17.6-950~22.04}
NO_PROXY: ''
PACKAGE_OPTION: ${PACKAGE_OPTION:-pip}
labels:
dependency.python.pip: jupyter-requirements.txt
org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.3.110}-xpu-${PACKAGE_OPTION:-pip}-base"
org.opencontainers.image.title: "Intel® Extension for PyTorch XPU Jupyter Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.3.110}-xpu-${PACKAGE_OPTION:-pip}-jupyter
target: ipex-xpu-jupyter
command: >
bash -c "python -m jupyter --version"
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.3.110xpu}-xpu-jupyter
ports:
- 8888:8888
torchserve-cpu:
build:
args:
PACKAGE_OPTION: pip
labels:
dependency.apt.numactl: true
dependency.apt.openjdk-17-jdk: true
dependency.idp: false
dependency.python.ipex: requirements.txt
dependency.python.pip: serving/torchserve-requirements.txt
docs: serving
org.opencontainers.base.name: "intel/python:3.10-core"
org.opencontainers.image.title: "Intel® Extension for PyTorch Serving Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-serving-cpu
target: torchserve-cpu
command: torchserve --version
entrypoint: ""
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-cpu
ports:
- 8080:8080
- 8081:8081
- 8082:8082
- 7070:7070
- 7071:7071
torchserve-xpu:
build:
args:
PACKAGE_OPTION: pip
XPU_SMI_VERSION: ${XPU_SMI_VERSION:-1.2.38}
TORCHSERVE_BASE: ipex-xpu-base
labels:
dependency.apt.numactl: true
dependency.apt.openjdk-17-jdk: true
dependency.apt.xpu-smi: ${XPU_SMI_VERSION:-1.2.38}
dependency.idp: false
dependency.python.pip: serving/torchserve-xpu-requirements.txt
docs: serving
org.opencontainers.base.name: "intel/python:3.10-core"
org.opencontainers.image.title: "Intel® Extension for PyTorch XPU Serving Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.3.110}-serving-xpu
target: torchserve-xpu
command: torchserve --version
entrypoint: ""
extends: xpu
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-py${PYTHON_VERSION:-3.10}-torchserve-xpu
hf-genai:
build:
args:
HF_VERSION: ${HF_VERSION:-4.44.0}
labels:
dependency.python.pip: hf-genai-requirements.txt
org.opencontainers.base.name: "intel/intel-optimized-pytorch:${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode"
org.opencontainers.image.title: "Intel® Extension for PyTorch MultiNode Huggingface Generative AI Image"
org.opencontainers.image.version: ${IPEX_VERSION:-2.4.0}-${PACKAGE_OPTION:-pip}-multinode-hf-${HF_VERSION:-4.44.0}-genai"
target: hf-genai
extends: ipex-base
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-${BASE_IMAGE_NAME:-ubuntu}-${BASE_IMAGE_TAG:-22.04}-${PACKAGE_OPTION:-pip}-py${PYTHON_VERSION:-3.10}-ipex-${IPEX_VERSION:-2.4.0}-hf-${HF_VERSION:-4.44.0}
command: >
bash -c "python -c 'import transformers; print(transformers.__version__)'"