Skip to content
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

Bump based CUDA image to ubuntu24.04 #1166

Merged
merged 23 commits into from
Dec 4, 2024
Merged

Conversation

DwarKapex
Copy link
Contributor

@DwarKapex DwarKapex commented Nov 22, 2024

Ubuntu24.04 uses python-3.12 as a main interpreter. Unfortunately, not all python packages, we use here, has py-3.12 wheel for amd64/arm64, so need to build the following packages from source:

  1. TF-Text
  2. Lingvo

Also python-3.12 added a system-wide protection layer (PEP 668) when install packages using pip:

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

There are at least 2 possible solutions:

  1. install everything into venv (the initial solution was proposed by @olupton).
  2. System-wide installation by forcing pip installation with env flag PIP_BREAK_SYSTEM_PACKAGES=1

This branch contains both solutions, but collective mind and experience of PyTorch team suggests to finalize the second solution (system-wide installation)

@DwarKapex DwarKapex marked this pull request as draft November 22, 2024 06:32
@DwarKapex DwarKapex self-assigned this Nov 22, 2024
@DwarKapex DwarKapex marked this pull request as ready for review November 22, 2024 06:32
.github/container/Dockerfile.base Outdated Show resolved Hide resolved
.github/container/Dockerfile.jax Outdated Show resolved Hide resolved
.github/container/Dockerfile.maxtext Show resolved Hide resolved
.github/container/Dockerfile.pax Show resolved Hide resolved
.github/workflows/_build.yaml Show resolved Hide resolved
@DwarKapex DwarKapex changed the title Vkozlov/move to ubuntu24.04 Bump based CUDA image to ubuntu24.04 Nov 22, 2024
@DwarKapex
Copy link
Contributor Author

@olupton desperately need your input here =)

@yhtang
Copy link
Collaborator

yhtang commented Nov 23, 2024

Some builds are still broken 😜

.github/container/Dockerfile.maxtext Outdated Show resolved Hide resolved
.github/container/Dockerfile.pax Outdated Show resolved Hide resolved
.github/container/Dockerfile.base Outdated Show resolved Hide resolved
.github/container/Dockerfile.maxtext Outdated Show resolved Hide resolved
.github/container/Dockerfile.pax Outdated Show resolved Hide resolved
@DwarKapex DwarKapex requested review from olupton and yhtang December 3, 2024 16:33
@DwarKapex
Copy link
Contributor Author

The latest changes includes the following:

  1. Installation python packages system-wide (using PIP_BREAK_SYSTEM_PACKAGES=1)
    2.Removing some python packages that installed with apt, but not removable by pip (in pip-finalize.sh)

Copy link
Collaborator

@yhtang yhtang left a comment

Choose a reason for hiding this comment

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

Looks mostly good!

Could you please resurrect the .amd64 Dockerfiles, even though we are not using them by default at this time? The concern here is that our lingvo/tftext builds add too many boilerplates to the Dockerfile, and are not easily removable should one day we want to move back to use the upstream wheels. We need a reference here to remind us how simple things could be 😁

@gpupuck
Copy link
Contributor

gpupuck commented Dec 3, 2024

I don't understand everything you've changed, but I'm good with the changes made for Dockerfile.base and Dockerfile.jax.

@DwarKapex
Copy link
Contributor Author

Looks mostly good!

Could you please resurrect the .amd64 Dockerfiles, even though we are not using them by default at this time? The concern here is that our lingvo/tftext builds add too many boilerplates to the Dockerfile, and are not easily removable should one day we want to move back to use the upstream wheels. We need a reference here to remind us how simple things could be 😁

Done

@DwarKapex DwarKapex requested a review from yhtang December 3, 2024 17:10
@DwarKapex DwarKapex requested a review from nouiz December 3, 2024 19:11
@yhtang yhtang merged commit 2a74610 into main Dec 4, 2024
111 of 133 checks passed
@yhtang yhtang deleted the vkozlov/move-to-ubuntu24.04 branch December 4, 2024 18:16
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.

5 participants