skypilot-nightly 1.0.0.dev20241229__py3-none-any.whl → 1.0.0.dev20241231__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sky/__init__.py CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
5
5
  import urllib.request
6
6
 
7
7
  # Replaced with the current commit when building the wheels.
8
- _SKYPILOT_COMMIT_SHA = '7ae2d25d3f1fa82d02f6f95d57e1cac6b928f425'
8
+ _SKYPILOT_COMMIT_SHA = '3b0b11011aefa882539e346629d0644fbd59cfe0'
9
9
 
10
10
 
11
11
  def _get_git_commit():
@@ -35,7 +35,7 @@ def _get_git_commit():
35
35
 
36
36
 
37
37
  __commit__ = _get_git_commit()
38
- __version__ = '1.0.0.dev20241229'
38
+ __version__ = '1.0.0.dev20241231'
39
39
  __root_dir__ = os.path.dirname(os.path.abspath(__file__))
40
40
 
41
41
 
sky/cli.py CHANGED
@@ -998,8 +998,10 @@ def cli():
998
998
  @click.option('--docker',
999
999
  'backend_name',
1000
1000
  flag_value=backends.LocalDockerBackend.NAME,
1001
- default=False,
1002
- help='If used, runs locally inside a docker container.')
1001
+ hidden=True,
1002
+ help=('(Deprecated) Local docker support is deprecated. '
1003
+ 'To run locally, create a local Kubernetes cluster with '
1004
+ '``sky local up``.'))
1003
1005
  @_add_click_options(_TASK_OPTIONS_WITH_NAME + _EXTRA_RESOURCES_OPTIONS)
1004
1006
  @click.option(
1005
1007
  '--idle-minutes-to-autostop',
@@ -1142,6 +1144,11 @@ def launch(
1142
1144
  backend: backends.Backend
1143
1145
  if backend_name == backends.LocalDockerBackend.NAME:
1144
1146
  backend = backends.LocalDockerBackend()
1147
+ click.secho(
1148
+ 'WARNING: LocalDockerBackend is deprecated and will be '
1149
+ 'removed in a future release. To run locally, create a local '
1150
+ 'Kubernetes cluster with `sky local up`.',
1151
+ fg='yellow')
1145
1152
  elif backend_name == backends.CloudVmRayBackend.NAME:
1146
1153
  backend = backends.CloudVmRayBackend()
1147
1154
  else:
@@ -31,12 +31,19 @@ def get_s3_mount_install_cmd() -> str:
31
31
  return install_cmd
32
32
 
33
33
 
34
- def get_s3_mount_cmd(bucket_name: str, mount_path: str) -> str:
34
+ # pylint: disable=invalid-name
35
+ def get_s3_mount_cmd(bucket_name: str,
36
+ mount_path: str,
37
+ _bucket_sub_path: Optional[str] = None) -> str:
35
38
  """Returns a command to mount an S3 bucket using goofys."""
39
+ if _bucket_sub_path is None:
40
+ _bucket_sub_path = ''
41
+ else:
42
+ _bucket_sub_path = f':{_bucket_sub_path}'
36
43
  mount_cmd = ('goofys -o allow_other '
37
44
  f'--stat-cache-ttl {_STAT_CACHE_TTL} '
38
45
  f'--type-cache-ttl {_TYPE_CACHE_TTL} '
39
- f'{bucket_name} {mount_path}')
46
+ f'{bucket_name}{_bucket_sub_path} {mount_path}')
40
47
  return mount_cmd
41
48
 
42
49
 
@@ -50,15 +57,20 @@ def get_gcs_mount_install_cmd() -> str:
50
57
  return install_cmd
51
58
 
52
59
 
53
- def get_gcs_mount_cmd(bucket_name: str, mount_path: str) -> str:
60
+ # pylint: disable=invalid-name
61
+ def get_gcs_mount_cmd(bucket_name: str,
62
+ mount_path: str,
63
+ _bucket_sub_path: Optional[str] = None) -> str:
54
64
  """Returns a command to mount a GCS bucket using gcsfuse."""
55
-
65
+ bucket_sub_path_arg = f'--only-dir {_bucket_sub_path} '\
66
+ if _bucket_sub_path else ''
56
67
  mount_cmd = ('gcsfuse -o allow_other '
57
68
  '--implicit-dirs '
58
69
  f'--stat-cache-capacity {_STAT_CACHE_CAPACITY} '
59
70
  f'--stat-cache-ttl {_STAT_CACHE_TTL} '
60
71
  f'--type-cache-ttl {_TYPE_CACHE_TTL} '
61
72
  f'--rename-dir-limit {_RENAME_DIR_LIMIT} '
73
+ f'{bucket_sub_path_arg}'
62
74
  f'{bucket_name} {mount_path}')
63
75
  return mount_cmd
64
76
 
@@ -79,10 +91,12 @@ def get_az_mount_install_cmd() -> str:
79
91
  return install_cmd
80
92
 
81
93
 
94
+ # pylint: disable=invalid-name
82
95
  def get_az_mount_cmd(container_name: str,
83
96
  storage_account_name: str,
84
97
  mount_path: str,
85
- storage_account_key: Optional[str] = None) -> str:
98
+ storage_account_key: Optional[str] = None,
99
+ _bucket_sub_path: Optional[str] = None) -> str:
86
100
  """Returns a command to mount an AZ Container using blobfuse2.
87
101
 
88
102
  Args:
@@ -91,6 +105,7 @@ def get_az_mount_cmd(container_name: str,
91
105
  belongs to.
92
106
  mount_path: Path where the container will be mounting.
93
107
  storage_account_key: Access key for the given storage account.
108
+ _bucket_sub_path: Sub path of the mounting container.
94
109
 
95
110
  Returns:
96
111
  str: Command used to mount AZ container with blobfuse2.
@@ -107,25 +122,38 @@ def get_az_mount_cmd(container_name: str,
107
122
  cache_path = _BLOBFUSE_CACHE_DIR.format(
108
123
  storage_account_name=storage_account_name,
109
124
  container_name=container_name)
125
+ if _bucket_sub_path is None:
126
+ bucket_sub_path_arg = ''
127
+ else:
128
+ bucket_sub_path_arg = f'--subdirectory={_bucket_sub_path}/ '
110
129
  mount_cmd = (f'AZURE_STORAGE_ACCOUNT={storage_account_name} '
111
130
  f'{key_env_var} '
112
131
  f'blobfuse2 {mount_path} --allow-other --no-symlinks '
113
132
  '-o umask=022 -o default_permissions '
114
133
  f'--tmp-path {cache_path} '
134
+ f'{bucket_sub_path_arg}'
115
135
  f'--container-name {container_name}')
116
136
  return mount_cmd
117
137
 
118
138
 
119
- def get_r2_mount_cmd(r2_credentials_path: str, r2_profile_name: str,
120
- endpoint_url: str, bucket_name: str,
121
- mount_path: str) -> str:
139
+ # pylint: disable=invalid-name
140
+ def get_r2_mount_cmd(r2_credentials_path: str,
141
+ r2_profile_name: str,
142
+ endpoint_url: str,
143
+ bucket_name: str,
144
+ mount_path: str,
145
+ _bucket_sub_path: Optional[str] = None) -> str:
122
146
  """Returns a command to install R2 mount utility goofys."""
147
+ if _bucket_sub_path is None:
148
+ _bucket_sub_path = ''
149
+ else:
150
+ _bucket_sub_path = f':{_bucket_sub_path}'
123
151
  mount_cmd = (f'AWS_SHARED_CREDENTIALS_FILE={r2_credentials_path} '
124
152
  f'AWS_PROFILE={r2_profile_name} goofys -o allow_other '
125
153
  f'--stat-cache-ttl {_STAT_CACHE_TTL} '
126
154
  f'--type-cache-ttl {_TYPE_CACHE_TTL} '
127
155
  f'--endpoint {endpoint_url} '
128
- f'{bucket_name} {mount_path}')
156
+ f'{bucket_name}{_bucket_sub_path} {mount_path}')
129
157
  return mount_cmd
130
158
 
131
159
 
@@ -137,9 +165,12 @@ def get_cos_mount_install_cmd() -> str:
137
165
  return install_cmd
138
166
 
139
167
 
140
- def get_cos_mount_cmd(rclone_config_data: str, rclone_config_path: str,
141
- bucket_rclone_profile: str, bucket_name: str,
142
- mount_path: str) -> str:
168
+ def get_cos_mount_cmd(rclone_config_data: str,
169
+ rclone_config_path: str,
170
+ bucket_rclone_profile: str,
171
+ bucket_name: str,
172
+ mount_path: str,
173
+ _bucket_sub_path: Optional[str] = None) -> str:
143
174
  """Returns a command to mount an IBM COS bucket using rclone."""
144
175
  # creates a fusermount soft link on older (<22) Ubuntu systems for
145
176
  # rclone's mount utility.
@@ -151,10 +182,14 @@ def get_cos_mount_cmd(rclone_config_data: str, rclone_config_path: str,
151
182
  'mkdir -p ~/.config/rclone/ && '
152
183
  f'echo "{rclone_config_data}" >> '
153
184
  f'{rclone_config_path}')
185
+ if _bucket_sub_path is None:
186
+ sub_path_arg = f'{bucket_name}/{_bucket_sub_path}'
187
+ else:
188
+ sub_path_arg = f'/{bucket_name}'
154
189
  # --daemon will keep the mounting process running in the background.
155
190
  mount_cmd = (f'{configure_rclone_profile} && '
156
191
  'rclone mount '
157
- f'{bucket_rclone_profile}:{bucket_name} {mount_path} '
192
+ f'{bucket_rclone_profile}:{sub_path_arg} {mount_path} '
158
193
  '--daemon')
159
194
  return mount_cmd
160
195
 
@@ -252,7 +287,7 @@ def get_mounting_script(
252
287
  script = textwrap.dedent(f"""
253
288
  #!/usr/bin/env bash
254
289
  set -e
255
-
290
+
256
291
  {command_runner.ALIAS_SUDO_TO_EMPTY_FOR_ROOT_CMD}
257
292
 
258
293
  MOUNT_PATH={mount_path}