Skip to content

Numpy Installation Issue & ARM Dockerfile PyArrow Update #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docker/1.0-1/base/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ARG CONDA_PKG_VERSION=4.13.0
ARG PYTHON_VERSION=3.8.13
ARG PYARROW_VERSION=10.0.1
ARG MLIO_VERSION=v0.8.0
ARG NUMPY_VERSION=1.24.1

# Install python and other scikit-learn runtime dependencies
# Dependency list from http://scikit-learn.org/stable/developers/advanced_installation.html#installing-build-dependencies
Expand Down Expand Up @@ -82,7 +81,6 @@ RUN echo "conda ${CONDA_PKG_VERSION}" >> /miniconda3/conda-meta/pinned && \
conda install -c conda-forge python=${PYTHON_VERSION} && \
conda install conda=${CONDA_PKG_VERSION} && \
conda update -y conda && \
conda install -c conda-forge numpy=${NUMPY_VERSION} && \
conda install -c conda-forge pyarrow=${PYARROW_VERSION} && \
cd /tmp && \
git clone --branch ${MLIO_VERSION} https://github.com/awslabs/ml-io.git mlio && \
Expand Down
8 changes: 6 additions & 2 deletions docker/1.0-1/base/Dockerfile_arm.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ARG MINICONDA_VERSION=4.9.2 # Upgraded version
ARG CONDA_PY_VERSION=38
ARG CONDA_PKG_VERSION=4.10.1
ARG PYTHON_VERSION=3.8.13
ARG PYARROW_VERSION=1.0.0
ARG MLIO_VERSION=arch-agnostic
ARG PYARROW_VERSION=10.0.1
ARG MLIO_VERSION=0.8.0

# Install python and other scikit-learn runtime dependencies
# Dependency list from http://scikit-learn.org/stable/developers/advanced_installation.html#installing-build-dependencies
Expand Down Expand Up @@ -66,6 +66,10 @@ RUN apt-get update && \
rm /etc/apt/trusted.gpg.d/kitware.gpg && \
rm -rf /var/lib/apt/lists/*

# http://ftp.us.debian.org/debian/pool/main/libf/libffi/libffi7_3.3-6_arm64.deb
COPY docker/1.0-1/resources/libffi7_3.3-6_arm64.deb /tmp
RUN dpkg -i /tmp/libffi7_3.3-6_arm64.deb

RUN cd /tmp && \
curl -L --output /tmp/Miniconda3.sh https://repo.anaconda.com/miniconda/Miniconda3-py${CONDA_PY_VERSION}_${MINICONDA_VERSION}-Linux-aarch64.sh && \
bash /tmp/Miniconda3.sh -bfp /miniconda3 && \
Expand Down
6 changes: 3 additions & 3 deletions docker/1.0-1/final/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RUN python -m pip install -r /requirements.txt && \
rm /requirements.txt

COPY dist/sagemaker_sklearn_container-2.0-py3-none-any.whl /sagemaker_sklearn_container-2.0-py3-none-any.whl
# https://github.com/googleapis/google-cloud-python/issues/6647
RUN rm -rf /miniconda3/lib/python3.7/site-packages/numpy-1.19.4.dist-info && \
pip install --no-cache /sagemaker_sklearn_container-2.0-py3-none-any.whl && \
RUN rm /miniconda3/lib/python3.8/site-packages/**/REQUESTED && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use -f here in case the file doesn't exist going forward?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fine if we leave it as is. These files are part of the PyPA specs, and reasons for why these files may no longer exist would relate to us not using conda or not having a requirements file. Even if in that unlikely scenario, I think it is fine for this to fail at build time on our side to force us to remove this.

rm /miniconda3/lib/python3.8/site-packages/**/direct_url.json
RUN pip install --no-cache /sagemaker_sklearn_container-2.0-py3-none-any.whl && \
rm /sagemaker_sklearn_container-2.0-py3-none-any.whl

ENV SAGEMAKER_TRAINING_MODULE sagemaker_sklearn_container.training:main
Expand Down
Binary file added docker/1.0-1/resources/libffi7_3.3-6_arm64.deb
Binary file not shown.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ MarkupSafe==2.1.1
Werkzeug==0.15.6
setuptools==65.5.1
wheel==0.38.1
numpy==1.24.1