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

Default docker install instructions shows scary errors and seems to fail... #1437

Open
iislucas opened this issue Mar 26, 2024 · 6 comments
Open
Assignees

Comments

@iislucas
Copy link

iislucas commented Mar 26, 2024

(MacBook Pro M1 2021. MacOS-14.4 + Docker - 4.28.0 (139021))

Following: https://github.com/pair-code/lit?tab=readme-ov-file#build-container-image

...
12.54      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 26.8 MB/s eta 0:00:00
12.65 Collecting tensorflow==2.10.0
12.70   Downloading tensorflow-2.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.9 kB)
12.74 Collecting tensorflow-datasets==4.8.0
12.80   Downloading tensorflow_datasets-4.8.0-py3-none-any.whl (5.2 MB)
13.63      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 6.2 MB/s eta 0:00:00
13.71 ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.8.0 Requires-Python >=3.11
13.71 ERROR: Could not find a version that satisfies the requirement tensorflow-text==2.10.0 (from versions: none)
13.71 ERROR: No matching distribution found for tensorflow-text==2.10.0
13.71
13.71 [notice] A new release of pip is available: 23.0.1 -> 24.0
13.71 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:36
--------------------
  34 |     # This step is slow as it installs many packages.
  35 |     COPY ./requirements*.txt ./
  36 | >>> RUN python -m pip install -r requirements.txt
  37 |
  38 |     # Copy the rest of the lit_nlp package
--------------------
ERROR: failed to solve: process "/bin/sh -c python -m pip install -r requirements.txt" did not complete successfully: exit code: 1
@iislucas iislucas changed the title Default install instructions shows scary errors and seems to fail... Default docker install instructions shows scary errors and seems to fail... Mar 26, 2024
@RyanMullins
Copy link
Member

Which Python version are you using? The requirements.txt file is pinned to Python v3.10

@RyanMullins
Copy link
Member

Oh... I just saw the Apple M1 architecture note. That's the problem. We've pinned to older versions of TF and TF Text and they don't support M-chips, only x86 AFAIK, so the Docker image is probably being built to target ARM and failing to find anything compatible on PyPI. Will investigate further.

@iislucas
Copy link
Author

iislucas commented Mar 27, 2024

lol, read the error Lucas! (I'm was using the default python installed by homebrew, 3.12)

I guess maybe we can improve the readme to make that dependency clearer ahead of time, so that the default setup on a modern machine doesn't error, e.g. by setting the command python3.10 instead of just python3.10?

@iislucas
Copy link
Author

Your guess was right, even with python 3.10 MacBook m1 install gives this error:

ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.8.0 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement tensorflow==2.10.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.1, 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.10.0

@RyanMullins
Copy link
Member

Yeah... I'm working on Py3.11-3.12 support for v1.2. This will include relaxing some dependencies that will allow running examples on M-chips. We're running into some version conflicts internally though so this may take a few more weeks to resolve.

@RyanMullins RyanMullins self-assigned this Mar 28, 2024
@RyanMullins RyanMullins linked a pull request Apr 11, 2024 that will close this issue
@RyanMullins
Copy link
Member

@iislucas I think that the dependency changes in #1364 will address the Apple Silicon incompatibilities, but I still need to verify that.

@RyanMullins RyanMullins removed a link to a pull request Apr 11, 2024
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

No branches or pull requests

2 participants