Giter Site home page Giter Site logo

Comments (5)

freedomtan avatar freedomtan commented on July 16, 2024 2

you got to build the fairseq2n, which is the native code part of the fairseq2, first

How I built it:

1. cd ${ROOT_OF_FAIRSEQ2}/fairseq2n
2. mkdir build
3. cd build  # now we are in ${ROOT_OF_FAIRSEQ2}/fairseq2n/build
4. cmake .. # with tbb 2021.q or later, libsndfile, and other dependencies installed, this should work
5. make install # or copy libfairseq2n.*.dylib in src/fairseq2n/ to the right lib path
6. cd ..
7. python setup.py bdist_wheel # there should be a pip wheel in dist 
8. pip install $THE_PIP_WHEEL_FILE_YOU_BUILD

from seamless_communication.

Mortimerp9 avatar Mortimerp9 commented on July 16, 2024 1

fairseq2 does not have a package for macos (intel or M1) yet, but you should be able to follow the manual build instructions of fairseq2: https://github.com/fairinternal/fairseq2#install-from-source

You might want to follow along on the fairseq2 repo if you want.

from seamless_communication.

PierreVannier avatar PierreVannier commented on July 16, 2024

Thanks @Mortimerp9 ! I’ll look into that. πŸ‘πŸ»
Link’s seems broken btw
You mean this one ?
https://github.com/facebookresearch/fairseq2#install-from-source

from seamless_communication.

changeling avatar changeling commented on July 16, 2024

@Mortimerp9 Could you re-open this issue? The install from source process on Apple Silicon doesn't seem to work.

MacBook Pro
MacOS 13.4.1
M1 Pro
16GB
Python 3.11

Starting with a fresh venv created by python3.11 -m venv venv and a freshly cloned fairseq2, following the procedure presented at https://github.com/facebookresearch/fairseq2#install-from-source, I see the following:

(venv)  fairseq2 % pip install .
Processing /Volumes/Project_Drive/seamless_communication_playground/fairseq2
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of fairseq2 to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement fairseq2n==0.1.0 (from fairseq2) (from versions: none)
ERROR: No matching distribution found for fairseq2n==0.1.0

from seamless_communication.

ponymushama avatar ponymushama commented on July 16, 2024

you got to build the fairseq2n, which is the native code part of the fairseq2, first

How I built it:

1. cd ${ROOT_OF_FAIRSEQ2}/fairseq2n
2. mkdir build
3. cd build  # now we are in ${ROOT_OF_FAIRSEQ2}/fairseq2n/build
4. cmake .. # with tbb 2021.q or later, libsndfile, and other dependencies installed, this should work
5. make install # or copy libfairseq2n.*.dylib in src/fairseq2n/ to the right lib path
6. cd ..
7. python setup.py bdist_wheel # there should be a pip wheel in dist 
8. pip install $THE_PIP_WHEEL_FILE_YOU_BUILD

cmake ..

CMake Error at CMakeLists.txt:16 (message):
  It looks like you are in a Conda environment, but the compiler packages are
  not installed.  Please run `conda install -c conda-forge compilers` first.


-- Configuring incomplete, errors occurred!

I meet this.

I have followed Install From Source (C++/CUDA) β€” fairseq2 0.1.0 documentation to install all the dependencies.


run conda install -c conda-forge compilers shows:

conda install -c conda-forge compilers

Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

run pip install torch -r fairseq2n/python/requirements-build.txt shows:

pip install torch -r fairseq2n/python/requirements-build.txt

Ignoring tbb-devel: markers 'platform_machine == "x86_64"' don't match your environment
Requirement already satisfied: torch in /Users/ponymushama/myvenv/lib/python3.11/site-packages (2.0.1)
Requirement already satisfied: cmake~=3.26 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 1)) (3.27.2)
Requirement already satisfied: ninja~=1.11 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 2)) (1.11.1)
Requirement already satisfied: packaging~=23.1 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 3)) (23.1)
Requirement already satisfied: pip~=23.2 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 4)) (23.2.1)
Requirement already satisfied: setuptools~=67.8 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 5)) (67.8.0)
Requirement already satisfied: wheel~=0.40 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from -r fairseq2n/python/requirements-build.txt (line 7)) (0.41.2)
Requirement already satisfied: filelock in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from torch) (3.12.2)
Requirement already satisfied: typing-extensions in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from torch) (4.7.1)
Requirement already satisfied: sympy in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from torch) (1.12)
Requirement already satisfied: networkx in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from torch) (3.1)
Requirement already satisfied: jinja2 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from torch) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from jinja2->torch) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in /Users/ponymushama/myvenv/lib/python3.11/site-packages (from sympy->torch) (1.3.0)

I have run conda install -c intel tbb-devel to install tbb-devel.

I have run conda install -y -c conda-forge libsndfile to install libsndfile.


from seamless_communication.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.