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

pip install cm4mlops - handle systems where sudo is absent #504

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

anandhu-eng
Copy link
Contributor

In reference to issue: #503

I tried to build the wheel through python3 setup.py bdist_wheel with these changes but got the following error:

running bdist_wheel
running build
/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
running install
running install_egg_info
running egg_info
writing cm4mlops.egg-info/PKG-INFO
writing dependency_links to cm4mlops.egg-info/dependency_links.txt
writing requirements to cm4mlops.egg-info/requires.txt
writing top-level names to cm4mlops.egg-info/top_level.txt
reading manifest file 'cm4mlops.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.md'
adding license file 'LICENSE.third-party.md'
writing manifest file 'cm4mlops.egg-info/SOURCES.txt'
removing 'build/bdist.linux-x86_64/wheel/cm4mlops-0.3.24.egg-info' (and everything under it)
Copying cm4mlops.egg-info to build/bdist.linux-x86_64/wheel/cm4mlops-0.3.24.egg-info
running install_scripts
Traceback (most recent call last):
  File "/cm4mlops/setup.py", line 152, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 403, in run
    self.run_command("install")
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/cm4mlops/setup.py", line 36, in run
    return self.custom_function()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/cm4mlops/setup.py", line 132, in custom_function
    import cmind
ModuleNotFoundError: No module named 'cmind'

I'm marking the PR as draft for now.

@anandhu-eng anandhu-eng requested a review from a team as a code owner November 8, 2024 06:37
@anandhu-eng anandhu-eng marked this pull request as draft November 8, 2024 06:37
Copy link

github-actions bot commented Nov 8, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

except subprocess.CalledProcessError:
print("Sudo command failed, trying without sudo.")
subprocess.check_call(['apt-get', 'update'])
subprocess.check_call(['apt-get', 'install', '-y'] + packages)
Copy link
Contributor

Choose a reason for hiding this comment

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

If both fails we should add a print statement for manual installation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @arjunsuresh , made changes in commit 11d77de.

@anandhu-eng anandhu-eng marked this pull request as ready for review November 8, 2024 14:14
@arjunsuresh arjunsuresh merged commit 2f9e99c into mlperf-inference Nov 8, 2024
70 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
@anandhu-eng anandhu-eng deleted the anandhu-eng-patch-6 branch November 8, 2024 15:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants