diff --git a/docs/source/getting-started/installation.rst b/docs/source/getting-started/installation.rst index 782c44f6bd..e566a38bac 100644 --- a/docs/source/getting-started/installation.rst +++ b/docs/source/getting-started/installation.rst @@ -17,7 +17,7 @@ Install SkyPilot using pip: .. code-block:: shell # Recommended: use a new conda env to avoid package conflicts. - # SkyPilot requires 3.7 <= python <= 3.11. + # SkyPilot requires 3.7 <= python <= 3.13. conda create -y -n sky python=3.10 conda activate sky @@ -33,10 +33,14 @@ Install SkyPilot using pip: pip install "skypilot[fluidstack]" pip install "skypilot[paperspace]" pip install "skypilot[cudo]" + # IBM is only supported for Python <= 3.11 pip install "skypilot[ibm]" + # SCP is only supported for Python <= 3.11 pip install "skypilot[scp]" pip install "skypilot[vsphere]" + # Nebius is only supported for Python >= 3.10 pip install "skypilot[nebius]" + pip install "skypilot[all]" diff --git a/sky/provision/docker_utils.py b/sky/provision/docker_utils.py index a2a3086227..083166d8b7 100644 --- a/sky/provision/docker_utils.py +++ b/sky/provision/docker_utils.py @@ -371,7 +371,7 @@ def initialize(self) -> str: 'mkdir -p ~/.ssh;' 'cat /tmp/host_ssh_authorized_keys >> ~/.ssh/authorized_keys;' 'sudo service ssh start;' - 'sudo sed -i "s/mesg n/tty -s \&\& mesg n/" ~/.profile;' + 'sudo sed -i "s/mesg n/tty -s \\&\\& mesg n/" ~/.profile;' f'{SETUP_ENV_VARS_CMD}', run_env='docker') diff --git a/sky/setup_files/dependencies.py b/sky/setup_files/dependencies.py index 5cc6632669..4ba9bde7f3 100644 --- a/sky/setup_files/dependencies.py +++ b/sky/setup_files/dependencies.py @@ -8,8 +8,12 @@ import sys from typing import Dict, List +clouds_with_ray = ['ibm', 'docker', 'scp'] + install_requires = [ 'wheel<0.46.0', # https://github.com/skypilot-org/skypilot/issues/5153 + 'setuptools', # TODO: match version to pyproject.toml once #5153 is fixed + 'pip', 'cachetools', # NOTE: ray requires click>=7.0. # click 8.2.0 has a bug in parsing the command line arguments: @@ -143,7 +147,7 @@ 'azure-storage-blob>=12.23.1', 'msgraph-sdk', 'msrestazure', - ] + local_ray, + ], # We need google-api-python-client>=2.69.0 to enable 'discardLocalSsd' # parameter for stopping instances. Reference: # https://github.com/googleapis/google-api-python-client/commit/f6e9d3869ed605b06f7cbf2e8cf2db25108506e6 @@ -164,7 +168,7 @@ 'lambda': [], # No dependencies needed for lambda 'cloudflare': aws_dependencies, 'scp': local_ray, - 'oci': ['oci'] + local_ray, + 'oci': ['oci'], # Kubernetes 32.0.0 has an authentication bug: https://github.com/kubernetes-client/python/issues/2333 # pylint: disable=line-too-long 'kubernetes': [ 'kubernetes>=20.0.0,!=32.0.0', 'websockets', 'python-dateutil' @@ -195,10 +199,21 @@ 'server': server_dependencies, } -# Nebius needs python3.10. If python 3.9 [all] will not install nebius +# Calculate which clouds should be included in the [all] installation. +clouds_for_all = set(extras_require) +clouds_for_all.remove('remote') + if sys.version_info < (3, 10): - filtered_keys = [k for k in extras_require if k != 'nebius'] - extras_require['all'] = sum( - [v for k, v in extras_require.items() if k != 'nebius'], []) -else: - extras_require['all'] = sum(extras_require.values(), []) + # Nebius needs python3.10. If python 3.9 [all] will not install nebius + clouds_for_all.remove('nebius') + +if sys.version_info >= (3, 12): + # The version of ray we use does not work with >= 3.12, so avoid clouds + # that require ray. + clouds_for_all -= set(clouds_with_ray) + # vast requires setuptools==51.1.1 which will not work with python >= 3.12 + # TODO: Remove once https://github.com/vast-ai/vast-sdk/pull/6 is released + clouds_for_all.remove('vast') + +extras_require['all'] = list( + set().union(*[extras_require[cloud] for cloud in clouds_for_all])) diff --git a/sky/setup_files/setup.py b/sky/setup_files/setup.py index 5300dbd31a..23b295ad03 100644 --- a/sky/setup_files/setup.py +++ b/sky/setup_files/setup.py @@ -178,6 +178,8 @@ def parse_readme(readme: str) -> str: 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries :: Python Modules',