Skip to content

Commit

Permalink
fix: Prevent chmod errors in log after unexpected triton restart (#36)
Browse files Browse the repository at this point in the history
* fix: Prevent chmod errors in log after unexpected triton restart

Motivation

Errors were observed by @tedhtchang in this situation:

chmod: changing permissions of '/models/_triton_models/simple-string-1180__ksp-a53a19561f/config.pbtxt': Operation not permitted
chmod: changing permissions of '/models/_triton_models/simple-string-167__ksp-a53a19561f': Operation not permitted
chmod: changing permissions of '/models/_triton_models/simple-string-167__ksp-a53a19561f/config.pbtxt': Operation not permitted
...

Since the /models/_triton_models dir contains files created by the adapter container which may run as a different user. Only the dir itself needs permissions set so that the adapter can write to it after it's first created.

Modifications

Remove -R from chmod command in triton-2.x ServingRuntime yaml.

Result

Avoid unnecessary errors in the log

* Update unit test fixture accordingly
  • Loading branch information
njhill authored Sep 23, 2021
1 parent 4207065 commit 47d0766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/runtimes/triton-2.x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
args:
- -c
- 'mkdir -p /models/_triton_models;
chmod -R 777 /models/_triton_models;
chmod 777 /models/_triton_models;
exec tritonserver
"--model-repository=/models/_triton_models"
"--model-control-mode=explicit"
Expand Down
2 changes: 1 addition & 1 deletion controllers/testdata/servingruntime_controller.golden
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ spec:
readOnly: true
- args:
- -c
- 'mkdir -p /models/_triton_models; chmod -R 777 /models/_triton_models; exec
- 'mkdir -p /models/_triton_models; chmod 777 /models/_triton_models; exec
tritonserver "--model-repository=/models/_triton_models" "--model-control-mode=explicit"
"--strict-model-config=false" "--strict-readiness=false" "--allow-http=true"
"--allow-sagemaker=false" '
Expand Down

0 comments on commit 47d0766

Please sign in to comment.