Skip to content

Commit 38c1245

Browse files
authored
patch hf pt inference (#5553)
* patch hf pt inference * test hf * install requirements.txt * revert toml
1 parent d002a3f commit 38c1245

File tree

5 files changed

+11
-37
lines changed

5 files changed

+11
-37
lines changed

huggingface/pytorch/inference/docker/2.6/py3/Dockerfile.cpu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/wh
144144
"cryptography>=42.0.5" \
145145
"ipython>=8.10.0,<9.0" \
146146
"awscli<2" \
147-
"urllib3>=1.26.18,<2" \
147+
"urllib3>=2.6" \
148+
"brotli>1.1" \
148149
"prompt-toolkit<3.0.39" \
149150
"setuptools>=70.0.0"
150151

huggingface/pytorch/inference/docker/2.6/py3/cu124/Dockerfile.gpu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,16 @@ RUN pip install --no-cache-dir -U \
194194
scipy \
195195
# "nvgpu" is a dependency of TS but is disabled in SM DLC build,
196196
# via ENV Variable "TS_DISABLE_SYSTEM_METRICS=true" in the SM section of this file.
197-
# due to incompatibility with SM hosts
197+
# due to incompatibility with SM hosts
198198
nvgpu \
199199
"pyopenssl>=24.0.0" \
200200
enum-compat==0.0.3 \
201201
captum \
202202
"Pillow>=9.0.0" \
203203
"cryptography>=42.0.5" \
204204
"ipython>=8.10.0,<9.0" \
205-
"urllib3>=1.26.18,<2" \
205+
"urllib3>=2.6" \
206+
"brotli>1.1" \
206207
"prompt-toolkit<3.0.39" \
207208
"setuptools>=70.0.0"
208209

test/sagemaker_tests/pytorch/inference/pytorch-inference-requirements.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

test/sagemaker_tests/pytorch/inference/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
boto3
22
coverage
3+
# SageMaker PyTorch Inference Toolkit still use docker compose v1
4+
# https://github.com/aws/sagemaker-pytorch-inference-toolkit/blob/v2.0.25/setup.py#L58
5+
# Docker v7.0.0 breaks compatibility with Docker Compose v1 (SageMaker Local)
6+
docker==6.1.3
7+
docker-compose
38
Flask==1.1.1
49
fabric
510
flake8==3.7.7

test/test_utils/sagemaker.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,7 @@ def execute_local_tests(image, pytest_cache_params):
347347
ec2_conn.run("sudo chmod +x /usr/local/bin/docker-compose")
348348

349349
with ec2_conn.cd(path):
350-
if "pytorch-inference" in image:
351-
ec2_conn.run(f"pip install -r pytorch-inference-requirements.txt")
352-
else:
353-
ec2_conn.run(f"pip install -r requirements.txt")
350+
ec2_conn.run(f"pip install -r requirements.txt")
354351

355352
pytest_cache_util.download_pytest_cache_from_s3_to_ec2(
356353
ec2_conn, path, **pytest_cache_params

0 commit comments

Comments
 (0)