Skip to content

Commit 0e29e1d

Browse files
authored
pin numpy to <2 in ci/docker (#2071)
1 parent 8014efc commit 0e29e1d

File tree

11 files changed

+29
-28
lines changed

11 files changed

+29
-28
lines changed

.github/workflows/continuous.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
python-version: '3.11'
3434
- name: install Python Dependencies
35-
run: pip3 install numpy yapf
35+
run: pip3 install "numpy<2" yapf
3636
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
3737
- uses: actions/cache@v4
3838
with:

.github/workflows/llm_inf2_integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
python-version: '3.10.x'
5656
- name: Install pip dependencies
57-
run: pip3 install requests numpy pillow wheel
57+
run: pip3 install requests "numpy<2" pillow wheel
5858
- name: Build container name
5959
run: ./serving/docker/scripts/docker_name_builder.sh pytorch-inf2 ${{ github.event.inputs.djl-version }}
6060
- name: Download models and dockers
@@ -109,7 +109,7 @@ jobs:
109109
with:
110110
python-version: '3.10.x'
111111
- name: Install pip dependencies
112-
run: pip3 install requests numpy pillow
112+
run: pip3 install requests "numpy<2" pillow
113113
- name: Build container name
114114
run: ./serving/docker/scripts/docker_name_builder.sh pytorch-inf2 ${{ github.event.inputs.djl-version }}
115115
- name: Download models and dockers
@@ -267,7 +267,7 @@ jobs:
267267
with:
268268
python-version: '3.10.x'
269269
- name: Install pip dependencies
270-
run: pip3 install requests numpy pillow
270+
run: pip3 install requests "numpy<2" pillow
271271
- name: Build container name
272272
run: ./serving/docker/scripts/docker_name_builder.sh pytorch-inf2 ${{ github.event.inputs.djl-version }}
273273
- name: Download models and dockers
@@ -365,7 +365,7 @@ jobs:
365365
with:
366366
python-version: '3.10.x'
367367
- name: Install pip dependencies
368-
run: pip3 install requests numpy pillow
368+
run: pip3 install requests "numpy<2" pillow
369369
- name: Build container name
370370
run: ./serving/docker/scripts/docker_name_builder.sh pytorch-inf2 ${{ github.event.inputs.djl-version }}
371371
- name: Download models and dockers

.github/workflows/llm_integration.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
python-version: '3.10.x'
7474
- name: Install pip dependencies
75-
run: pip3 install requests numpy huggingface_hub
75+
run: pip3 install requests "numpy<2" huggingface_hub
7676
- name: Build container name
7777
run: ./serving/docker/scripts/docker_name_builder.sh ${{ matrix.arch }} ${{ github.event.inputs.djl-version }}
7878
- name: Download models and dockers
@@ -176,7 +176,7 @@ jobs:
176176
with:
177177
python-version: '3.10.x'
178178
- name: Install pip dependencies
179-
run: pip3 install requests numpy huggingface_hub
179+
run: pip3 install requests "numpy<2" huggingface_hub
180180
- name: Build container name
181181
run: ./serving/docker/scripts/docker_name_builder.sh tensorrt-llm ${{ github.event.inputs.djl-version }}
182182
- name: Download models and dockers
@@ -290,7 +290,7 @@ jobs:
290290
with:
291291
python-version: '3.10.x'
292292
- name: Install pip dependencies
293-
run: pip3 install requests numpy huggingface_hub
293+
run: pip3 install requests "numpy<2" huggingface_hub
294294
- name: Build container name
295295
run: ./serving/docker/scripts/docker_name_builder.sh tensorrt-llm ${{ github.event.inputs.djl-version }}
296296
- name: Download models and dockers
@@ -504,7 +504,7 @@ jobs:
504504
with:
505505
python-version: '3.10.x'
506506
- name: Install pip dependencies
507-
run: pip3 install requests numpy huggingface_hub
507+
run: pip3 install requests "numpy<2" huggingface_hub
508508
- name: Build container name
509509
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
510510
- name: Download docker
@@ -595,7 +595,7 @@ jobs:
595595
with:
596596
python-version: '3.10.x'
597597
- name: Install pip dependencies
598-
run: pip3 install requests numpy
598+
run: pip3 install requests "numpy<2"
599599
- name: Build container name
600600
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
601601
- name: Download docker
@@ -713,7 +713,7 @@ jobs:
713713
with:
714714
python-version: '3.10.x'
715715
- name: Install pip dependencies
716-
run: pip3 install requests numpy huggingface_hub
716+
run: pip3 install requests "numpy<2" huggingface_hub
717717
- name: Build container name
718718
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
719719
- name: Download docker
@@ -823,7 +823,7 @@ jobs:
823823
with:
824824
python-version: '3.10.x'
825825
- name: Install pip dependencies
826-
run: pip3 install requests numpy huggingface_hub
826+
run: pip3 install requests "numpy<2" huggingface_hub
827827
- name: Build container name
828828
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
829829
- name: Download docker
@@ -914,7 +914,7 @@ jobs:
914914
with:
915915
python-version: '3.10.x'
916916
- name: Install pip dependencies
917-
run: pip3 install requests numpy huggingface_hub
917+
run: pip3 install requests "numpy<2" huggingface_hub
918918
- name: Build container name
919919
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
920920
- name: Download docker

.github/workflows/llm_integration_p4d.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
python-version: '3.10.x'
5151
- name: Install pip dependencies
52-
run: pip3 install requests numpy
52+
run: pip3 install requests "numpy<2"
5353
- name: Build container name
5454
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
5555
- name: Download models and dockers
@@ -126,7 +126,7 @@ jobs:
126126
with:
127127
python-version: '3.10.x'
128128
- name: Install pip dependencies
129-
run: pip3 install requests numpy
129+
run: pip3 install requests "numpy<2"
130130
- name: Build container name
131131
run: ./serving/docker/scripts/docker_name_builder.sh tensorrt-llm ${{ github.event.inputs.djl-version }}
132132
- name: Download models and dockers
@@ -185,7 +185,7 @@ jobs:
185185
with:
186186
python-version: '3.10.x'
187187
- name: Install pip dependencies
188-
run: pip3 install requests numpy
188+
run: pip3 install requests "numpy<2"
189189
- name: Build container name
190190
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
191191
- name: Download models and dockers

.github/workflows/lmi-dist-deps-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
python -m venv venv
4646
. ./venv/bin/activate
4747
python -m pip install --upgrade pip
48-
python -m pip install numpy cmake awscli packaging wheel setuptools ninja git-remote-codecommit \
48+
python -m pip install "numpy<2" cmake awscli packaging wheel setuptools ninja git-remote-codecommit \
4949
torch==2.3.0 --extra-index-url https://download.pytorch.org/whl/cu121
5050
- name: Configure AWS Credentials
5151
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/lmi-no-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
with:
9595
python-version: '3.10.x'
9696
- name: Install pip dependencies
97-
run: pip3 install requests numpy
97+
run: pip3 install requests "numpy<2"
9898
- name: Install s5cmd
9999
working-directory: serving/docker
100100
run: sudo scripts/install_s5cmd.sh x64
@@ -188,7 +188,7 @@ jobs:
188188
with:
189189
python-version: '3.10.x'
190190
- name: Install pip dependencies
191-
run: pip3 install requests numpy huggingface_hub
191+
run: pip3 install requests "numpy<2" huggingface_hub
192192
- name: Install s5cmd
193193
working-directory: serving/docker
194194
run: sudo scripts/install_s5cmd.sh x64

.github/workflows/lmic_performance.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
python-version: '3.10.x'
5555
- name: Install pip dependencies
56-
run: pip3 install requests numpy datetime
56+
run: pip3 install requests "numpy<2" datetime
5757
- name: Build container name
5858
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
5959
- name: Download models and dockers
@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
python-version: '3.10.x'
9191
- name: Install pip dependencies
92-
run: pip3 install requests numpy datetime
92+
run: pip3 install requests "numpy<2" datetime
9393
- name: Build container name
9494
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
9595
- name: Download models and dockers
@@ -125,7 +125,7 @@ jobs:
125125
with:
126126
python-version: '3.10.x'
127127
- name: Install pip dependencies
128-
run: pip3 install requests numpy datetime
128+
run: pip3 install requests "numpy<2" datetime
129129
- name: Build container name
130130
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
131131
- name: Download models and dockers
@@ -161,7 +161,7 @@ jobs:
161161
with:
162162
python-version: '3.10.x'
163163
- name: Install pip dependencies
164-
run: pip3 install requests numpy datetime
164+
run: pip3 install requests "numpy<2" datetime
165165
- name: Build container name
166166
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
167167
- name: Download models and dockers
@@ -197,7 +197,7 @@ jobs:
197197
with:
198198
python-version: '3.10.x'
199199
- name: Install pip dependencies
200-
run: pip3 install requests numpy datetime
200+
run: pip3 install requests "numpy<2" datetime
201201
- name: Build container name
202202
run: ./serving/docker/scripts/docker_name_builder.sh lmi ${{ github.event.inputs.djl-version }}
203203
- name: Download models and dockers

engines/python/setup/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def run(self):
5656
requirements = ['psutil', 'packaging', 'wheel']
5757

5858
test_requirements = [
59-
'numpy', 'requests', 'Pillow', 'transformers', 'torch', 'einops',
59+
'numpy<2', 'requests', 'Pillow', 'transformers', 'torch', 'einops',
6060
'accelerate', 'sentencepiece', 'protobuf', "peft", 'yapf',
6161
'pydantic>=2.0', "objgraph"
6262
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
numpy
1+
numpy<2

serving/docker/pytorch-gpu.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ARG torch_version=2.2.2
1919
ARG torch_vision_version=0.17.2
2020
ARG onnx_version=1.17.1
2121
ARG python_version=3.10
22+
ARG numpy_version=1.26.4
2223

2324
RUN mkdir -p /opt/djl/conf && \
2425
mkdir -p /opt/ml/model
@@ -56,7 +57,7 @@ RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh && \
5657
curl -o $(ls -d /usr/local/djl-serving-*/)lib/onnxruntime_gpu-$onnx_version.jar https://publish.djl.ai/onnxruntime/$onnx_version/onnxruntime_gpu-$onnx_version.jar && \
5758
scripts/install_python.sh ${python_version} && \
5859
scripts/install_s5cmd.sh x64 && \
59-
pip3 install numpy && pip3 install torch==${torch_version} torchvision==${torch_vision_version} --extra-index-url https://download.pytorch.org/whl/cu121 && \
60+
pip3 install numpy==${numpy_version} && pip3 install torch==${torch_version} torchvision==${torch_vision_version} --extra-index-url https://download.pytorch.org/whl/cu121 && \
6061
scripts/patch_oss_dlc.sh python && \
6162
scripts/security_patch.sh pytorch-gpu && \
6263
useradd -m -d /home/djl djl && \

0 commit comments

Comments
 (0)