Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add Remote Python Sidecar #326

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 22 additions & 0 deletions src/xpk/commands/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,28 @@
volumeMounts:
- mountPath: /tmp
name: shared-tmp
initContainers:
# TODO(sujinesh): We should make this optional and only part of the
# workload if the user provides the image/enables remote python.
- args:
name: remote-python-sidecar
image: {args.remote_python_sidecar_image}
imagePullPolicy: Always
command:
- "bash"
- "-c"
- |
python start_remote_python.py
securityContext:
privileged: true
volumeMounts:
- mountPath: /tmp
name: shared-tmp
ports:
- containerPort: 50051
env:
- name: GRPC_SERVER_ADDRESS
value: "0.0.0.0:50051"
nodeSelector:
{accelerator_label}
{machine_label}
Expand Down
8 changes: 8 additions & 0 deletions src/xpk/parser/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,14 @@ def add_shared_workload_create_optional_arguments(args_parsers):
' event or deletion request.Defaults to 30 seconds.'
),
)
custom_parser.add_argument(
'--remote-python-sidecar-image',
type=str,
default='TempImageLocation',
help=(
'Remote Python sidecar image to use.'
),
)
custom_parser.add_argument(
'--enable-debug-logs',
action='store_true',
Expand Down
Loading