Skip to content

Commit

Permalink
Add Remote Python Sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
SujeethJinesh committed Jan 14, 2025
1 parent 072f7de commit 39e0b04
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/xpk/commands/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,26 @@
volumeMounts:
- mountPath: /tmp
name: shared-tmp
initContainers:
- 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

0 comments on commit 39e0b04

Please sign in to comment.