diff --git a/sky/skylet/constants.py b/sky/skylet/constants.py index e016de5fc2d..d738bcb5e52 100644 --- a/sky/skylet/constants.py +++ b/sky/skylet/constants.py @@ -104,7 +104,9 @@ # set UV_SYSTEM_PYTHON to false in case the # user provided docker image set it to true. # unset PYTHONPATH in case the user provided docker image set it. -SKY_UV_CMD = ('UV_SYSTEM_PYTHON=false ' +# UV_LINK_MODE=copy avoids a uv >=0.10.5 bug where clone/reflink mode +# strips execute permissions on XFS filesystems, breaking Ray binaries. +SKY_UV_CMD = ('UV_LINK_MODE=copy UV_SYSTEM_PYTHON=false ' f'{SKY_UNSET_PYTHONPATH_AND_SET_CWD} {SKY_UV_INSTALL_DIR}/uv') # This won't reinstall uv if it's already installed, so it's safe to re-run. SKY_UV_INSTALL_CMD = (f'{SKY_UV_CMD} -V >/dev/null 2>&1 || ' diff --git a/sky/templates/kubernetes-ray.yml.j2 b/sky/templates/kubernetes-ray.yml.j2 index 982af72124d..f16d9fa983d 100644 --- a/sky/templates/kubernetes-ray.yml.j2 +++ b/sky/templates/kubernetes-ray.yml.j2 @@ -922,7 +922,7 @@ available_node_types: # set UV_SYSTEM_PYTHON to false in case the user provided docker image set it to true. # unset PYTHONPATH and set CWD to $HOME to avoid user image interfering with SkyPilot runtime. - VIRTUAL_ENV=~/skypilot-runtime UV_SYSTEM_PYTHON=false {{sky_unset_pythonpath_and_set_cwd}} ~/.local/bin/uv pip install skypilot[kubernetes,remote] + VIRTUAL_ENV=~/skypilot-runtime UV_LINK_MODE=copy UV_SYSTEM_PYTHON=false {{sky_unset_pythonpath_and_set_cwd}} ~/.local/bin/uv pip install skypilot[kubernetes,remote] # Wait for `patch` package to be installed before applying ray patches until dpkg -l | grep -q "^ii patch "; do sleep 0.1 @@ -930,7 +930,7 @@ available_node_types: done # Apply Ray patches for progress bar fix # ~/.sky/python_path is seeded by conda_installation_commands - VIRTUAL_ENV=~/skypilot-runtime UV_SYSTEM_PYTHON=false {{sky_unset_pythonpath_and_set_cwd}} ~/.local/bin/uv pip list | grep "ray " | grep 2.9.3 2>&1 > /dev/null && { + VIRTUAL_ENV=~/skypilot-runtime UV_LINK_MODE=copy UV_SYSTEM_PYTHON=false {{sky_unset_pythonpath_and_set_cwd}} ~/.local/bin/uv pip list | grep "ray " | grep 2.9.3 2>&1 > /dev/null && { {{sky_unset_pythonpath_and_set_cwd}} $(cat ~/.sky/python_path) -c "from sky.skylet.ray_patches import patch; patch()" || exit 1; } touch /tmp/ray_skypilot_installation_complete