Skip to content

Commit

Permalink
Pin numpy<2 for PT 2.4 training SM (#4432)
Browse files Browse the repository at this point in the history
* Pin numpy<2 for PT 2.4 training SM

* pin packages

* pin packages in cpu

* pin last

* revert toml

* revert dockerfile

* remove dockerfile comment
  • Loading branch information
sirutBuasai authored Nov 21, 2024
1 parent 33d0bd4 commit 6b77f85
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions pytorch/training/docker/2.4/py3/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ RUN pip install --no-cache-dir -U \
s3torchconnector \
fastai \
accelerate \
# pin numpy requirement for fastai dependency
# requires explicit declaration of spacy, thic, blis
spacy \
thinc \
blis \
"numpy<2" \
&& pip uninstall -y dataclasses

# Install SM packages
Expand All @@ -310,8 +304,14 @@ RUN /opt/conda/bin/mamba install -y -c conda-forge \
scikit-learn \
seaborn \
shap \
# pinned for sagemaker==2.232.2
# pinned for sagemaker==2.235.1
"cloudpickle==2.2.1" \
# pin numpy requirement for sagemaker dependency
# requires explicit declaration of spacy, thic, blis
spacy \
thinc \
blis \
"numpy<2" \
&& /opt/conda/bin/mamba clean -afy

# Copy workaround script for incorrect hostname
Expand Down
14 changes: 7 additions & 7 deletions pytorch/training/docker/2.4/py3/cu124/Dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,6 @@ RUN pip install --no-cache-dir -U \
s3torchconnector \
fastai \
accelerate \
# pin numpy requirement for fastai dependency
# requires explicit declaration of spacy, thic, blis
spacy \
thinc \
blis \
"numpy<2" \
&& pip uninstall dataclasses

# Install GDRCopy which is a dependency of SM Distributed DataParallel binary
Expand Down Expand Up @@ -492,8 +486,14 @@ RUN /opt/conda/bin/mamba install -y -c conda-forge \
shap \
scikit-learn \
seaborn \
# pinned for sagemaker==2.232.2
# pinned for sagemaker==2.235.1
"cloudpickle==2.2.1" \
# pin numpy requirement for sagemaker dependency
# requires explicit declaration of spacy, thic, blis
spacy \
thinc \
blis \
"numpy<2" \
&& /opt/conda/bin/mamba clean -afy

# Add SageMaker DataParallel to LD_LIBRARY_PATH
Expand Down

0 comments on commit 6b77f85

Please sign in to comment.