From 8f6d8b73ffce41e40a75eda9e7156d2d264aef91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20H=C3=A1va?= Date: Wed, 14 Aug 2024 13:52:21 +0200 Subject: [PATCH] fix: don't run as root (#400) --- aws-sagemaker-hosted-scorer/build.gradle | 1 + gcp-cloud-run/build.gradle | 1 + gcp-vertex-ai-mojo-scorer/build.gradle | 1 + local-rest-scorer/build.gradle | 1 + 4 files changed, 4 insertions(+) diff --git a/aws-sagemaker-hosted-scorer/build.gradle b/aws-sagemaker-hosted-scorer/build.gradle index a66d579a..222adb10 100644 --- a/aws-sagemaker-hosted-scorer/build.gradle +++ b/aws-sagemaker-hosted-scorer/build.gradle @@ -50,6 +50,7 @@ jib { } container { jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList() + user = 1001 ports = ['8080'] volumes = [ // mojo pipeline and license file will live here diff --git a/gcp-cloud-run/build.gradle b/gcp-cloud-run/build.gradle index 32ebfea0..748f4eb0 100644 --- a/gcp-cloud-run/build.gradle +++ b/gcp-cloud-run/build.gradle @@ -47,6 +47,7 @@ jib { } container { jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList() + user = 1001 ports = ['8080'] environment = [ // The expected path to the DAI license file. diff --git a/gcp-vertex-ai-mojo-scorer/build.gradle b/gcp-vertex-ai-mojo-scorer/build.gradle index 482bd0b4..dd3fd400 100644 --- a/gcp-vertex-ai-mojo-scorer/build.gradle +++ b/gcp-vertex-ai-mojo-scorer/build.gradle @@ -64,6 +64,7 @@ jib { } container { jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList() + user = 1001 ports = ['8080'] environment = [ // The expected path to the DAI license file. diff --git a/local-rest-scorer/build.gradle b/local-rest-scorer/build.gradle index bf22837f..93ac3697 100644 --- a/local-rest-scorer/build.gradle +++ b/local-rest-scorer/build.gradle @@ -73,6 +73,7 @@ jib { } container { jvmFlags = defaultJibContainerJvmFlags.split(" ").each { it.trim() }.toList() + user = 1001 ports = ['8080'] volumes = [ // For storing the mojo2 file with the model to be used for scoring.