Spaces:
Paused
Paused
Commit ·
bcc27a5
1
Parent(s): 6279175
training: use -- and bash -c to bypass hf CLI typer flag stealing
Browse files
training/hf_run_space_train_job.sh
CHANGED
|
@@ -33,6 +33,8 @@ cd /work
|
|
| 33 |
chmod +x training/hf_remote_run.sh
|
| 34 |
exec bash training/hf_remote_run.sh'
|
| 35 |
|
|
|
|
|
|
|
| 36 |
exec hf jobs run \
|
| 37 |
--flavor "$FLAVOR" \
|
| 38 |
--detach \
|
|
@@ -41,5 +43,4 @@ exec hf jobs run \
|
|
| 41 |
--env "SPACE_REPO=$SPACE_REPO" \
|
| 42 |
--env "NB_EXEC_TIMEOUT=$NB_EXEC_TIMEOUT" \
|
| 43 |
--env "SMOKE_MODE=$SMOKE_MODE" \
|
| 44 |
-
"$IMAGE"
|
| 45 |
-
bash -lc "$BOOTSTRAP"
|
|
|
|
| 33 |
chmod +x training/hf_remote_run.sh
|
| 34 |
exec bash training/hf_remote_run.sh'
|
| 35 |
|
| 36 |
+
# Use `--` to terminate hf CLI option parsing — otherwise `bash -lc <script>`
|
| 37 |
+
# is parsed as `--label c <script>` (typer consumes the `-l` short flag).
|
| 38 |
exec hf jobs run \
|
| 39 |
--flavor "$FLAVOR" \
|
| 40 |
--detach \
|
|
|
|
| 43 |
--env "SPACE_REPO=$SPACE_REPO" \
|
| 44 |
--env "NB_EXEC_TIMEOUT=$NB_EXEC_TIMEOUT" \
|
| 45 |
--env "SMOKE_MODE=$SMOKE_MODE" \
|
| 46 |
+
-- "$IMAGE" bash -c "$BOOTSTRAP"
|
|
|