Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sky/provision/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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;'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Starting in Python 3.12, there is a warning `.../sky/provision/docker_utils.py:333: SyntaxWarning: invalid escape sequence '&'.
This should be what's intended.

f'{SETUP_ENV_VARS_CMD}',
run_env='docker')

Expand Down
29 changes: 21 additions & 8 deletions sky/setup_files/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

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 >= 7.0',
Expand Down Expand Up @@ -115,7 +117,7 @@
'azure-mgmt-compute>=33.0.0',
'azure-storage-blob>=12.23.1',
'msgraph-sdk',
] + 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
Expand All @@ -130,7 +132,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'],
'remote': remote,
Expand All @@ -156,10 +158,21 @@
] + aws_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 -= {'ibm', 'docker', 'scp'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we keep this at the top as a constant?

# 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]))
2 changes: 2 additions & 0 deletions sky/setup_files/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,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',
Expand Down