Skip to content

Commit

Permalink
Merge pull request #90 from Danand/feature/macos-support
Browse files Browse the repository at this point in the history
Fix installation on MacOS
  • Loading branch information
DavidDoukhan authored Jan 6, 2025
2 parents 253baeb + bb19e3f commit 92fecbd
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@


import os
import platform
import sys

from setuptools import setup, find_packages
import versioneer

Expand Down Expand Up @@ -104,6 +107,32 @@
```
'''

platform_dependent_packages = []

if sys.platform == 'darwin':
platform_dependent_packages.append('tensorflow')

if platform.machine() == 'arm64':
platform_dependent_packages.append('onnxruntime-silicon')
else:
platform_dependent_packages.append('onnxruntime')
else:
platform_dependent_packages.append('tensorflow[and-cuda]')
platform_dependent_packages.append('onnxruntime-gpu')

requirements = [
'numpy',
'pandas',
'scikit-image',
'pyannote.core',
'matplotlib',
'Pyro4',
'pytextgrid',
'soundfile',
*platform_dependent_packages,
#'torch',
]

setup(
name = "inaSpeechSegmenter",
version = versioneer.get_version(),
Expand All @@ -113,7 +142,7 @@
test_suite="run_test.py",
description = DESCRIPTION,
license = "MIT",
install_requires=['tensorflow[and-cuda]', 'numpy', 'pandas', 'scikit-image', 'pyannote.core', 'matplotlib', 'Pyro4', 'pytextgrid', 'soundfile', 'onnxruntime-gpu'], #'torch'
install_requires=requirements,
# keywords = "example documentation tutorial",
url = "https://github.com/ina-foss/inaSpeechSegmenter",
# packages=['inaSpeechSegmenter'],
Expand Down

0 comments on commit 92fecbd

Please sign in to comment.