Skip to content

Commit

Permalink
[dashboard] add memray to requirements.txt again (ray-project#44401)
Browse files Browse the repository at this point in the history
ray-project#44315 is reverted since windows tests are failing. The reason is that memray does not support windows so the pip requirements is failed to run.

This PR fixed the requirements issue by conditional install memray when current system platform is not win32

Note: In last PR, we added memray as a required dependency for dashboard (default), and it's not set required in this PR.

---------

Signed-off-by: bhuang <[email protected]>
  • Loading branch information
brycehuang30 authored Apr 3, 2024
1 parent 4172f75 commit 3bd912e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dashboard/modules/reporter/profile_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ async def detach_profiler(
cmd.append("--verbose")
cmd.append(str(pid))

if await _can_passwordless_sudo():
cmd = ["sudo", "-n"] + cmd

process = await asyncio.create_subprocess_exec(
*cmd,
stdout=subprocess.PIPE,
Expand Down
1 change: 1 addition & 0 deletions python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ pandas>=1.3
pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3 # Serve users can use pydantic<2
py-spy>=0.2.0
watchfiles
memray; sys_platform != "win32" # memray is not supported on Windows
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def get_packages(self):
"prometheus_client >= 0.7.1",
"smart_open",
"virtualenv >=20.0.24, !=20.21.1", # For pip runtime env.
"memray; sys_platform != 'win32'",
],
"client": [
# The Ray client needs a specific range of gRPC to work:
Expand Down

0 comments on commit 3bd912e

Please sign in to comment.