From 3838247716d1df0ca059a83a049fd7297d4fa29a Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Wed, 19 Jul 2023 16:47:50 +0300 Subject: [PATCH] Update k8s glue docker build resources --- docker/k8s-glue/build-resources/clearml.conf | 2 +- docker/k8s-glue/build-resources/entrypoint.sh | 7 ++++++- docker/k8s-glue/build-resources/setup.sh | 16 ++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/docker/k8s-glue/build-resources/clearml.conf b/docker/k8s-glue/build-resources/clearml.conf index 7e0b5ab..1500af1 100644 --- a/docker/k8s-glue/build-resources/clearml.conf +++ b/docker/k8s-glue/build-resources/clearml.conf @@ -58,7 +58,7 @@ agent { type: pip, # specify pip version to use (examples "<20.2", "==19.3.1", "", empty string will install the latest version) - pip_version: "<21", + pip_version: ["<20.2 ; python_version < '3.10'", "<22.3 ; python_version >= '3.10'"], # virtual environment inheres packages from system system_site_packages: false, diff --git a/docker/k8s-glue/build-resources/entrypoint.sh b/docker/k8s-glue/build-resources/entrypoint.sh index 2b895e9..79c3b0d 100644 --- a/docker/k8s-glue/build-resources/entrypoint.sh +++ b/docker/k8s-glue/build-resources/entrypoint.sh @@ -33,4 +33,9 @@ echo "api.files_server: ${CLEARML_FILES_HOST}" >> ~/clearml.conf ./provider_entrypoint.sh -python3 k8s_glue_example.py --queue ${QUEUE} --max-pods ${MAX_PODS} ${EXTRA_ARGS} +if [[ -z "${K8S_GLUE_MAX_PODS}" ]] +then + python3 k8s_glue_example.py --queue ${QUEUE} ${EXTRA_ARGS} +else + python3 k8s_glue_example.py --queue ${QUEUE} --max-pods ${MAX_PODS} ${EXTRA_ARGS} +fi diff --git a/docker/k8s-glue/build-resources/setup.sh b/docker/k8s-glue/build-resources/setup.sh index 41083ab..3045109 100644 --- a/docker/k8s-glue/build-resources/setup.sh +++ b/docker/k8s-glue/build-resources/setup.sh @@ -2,13 +2,17 @@ chmod +x /root/entrypoint.sh -apt-get update -y -apt-get dist-upgrade -y -apt-get install -y curl unzip less locales +apt-get update -qqy +apt-get dist-upgrade -qqy +apt-get install -qqy curl unzip less locales locale-gen en_US.UTF-8 -apt-get install -y curl python3-pip git +apt-get update -qqy +apt-get install -qqy curl gcc python3-dev python3-pip apt-transport-https lsb-release openssh-client git gnupg +rm -rf /var/lib/apt/lists/* +apt clean + python3 -m pip install -U pip -python3 -m pip install clearml-agent -python3 -m pip install -U "cryptography>=2.9" +python3 -m pip install --no-cache-dir clearml-agent +python3 -m pip install -U --no-cache-dir "cryptography>=2.9"