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

Conversation

amzn-choeric
Copy link
Contributor

@amzn-choeric amzn-choeric commented Feb 9, 2023

Issue #, if available:

Description of changes:
There is likely some package manager issue resulting in an incomplete uninstallation of numpy when it is downgraded by pip, which eventually results in installation issues with user-specified requirements. This problem exists whether we explicitly install numpy through conda or not. Note that numpy is installed by conda anyways through pyarrow even if not explicitly specified. For the time being, I am removing the specific files that are causing a problem with this process. I moved numpy back to the requirements document as it was just faster to test through the final Dockerfile as opposed the base Dockerfile since the base takes longer to build.

On a related note, merging in the following PR submitted about two weeks ago: #160.

Unit and integration tests have been ran against the new changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amzn-choeric amzn-choeric requested a review from a team February 9, 2023 18:06
# 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.

@amzn-choeric amzn-choeric merged commit 9d94f48 into master Feb 10, 2023
@amzn-choeric amzn-choeric deleted the numpy branch February 10, 2023 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants