diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 32abfca..066e190 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -375,4 +375,4 @@ jobs: --env-file /tmp/docker.env \ -v $(pwd):/tmp \ -w /tmp \ - ${DOCKER_IMG_PREFIX:-qpod}/docker-kit python /opt/utils/image-syncer/run_jobs.py + ${IMG_NAMESPACE:-qpod}/docker-kit python /opt/utils/image-syncer/run_jobs.py diff --git a/docker_atom/work/script-setup-db-clients.sh b/docker_atom/work/script-setup-db-clients.sh index bc32ed1..3477dce 100644 --- a/docker_atom/work/script-setup-db-clients.sh +++ b/docker_atom/work/script-setup-db-clients.sh @@ -5,7 +5,7 @@ setup_postgresql_client() { local VER_PG=${PG_MAJOR:-"15"} # from: https://www.postgresql.org/download/linux/ubuntu/ echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list - curl "https://www.postgresql.org/media/keys/ACCC4CF8.asc" | sudo sudo tee /etc/apt/trusted.gpg.d/postgresql.asc + curl "https://www.postgresql.org/media/keys/ACCC4CF8.asc" | sudo tee /etc/apt/trusted.gpg.d/postgresql.asc sudo apt-get update # will download ~9MB files and use ~55MB disk after installation sudo apt-get -y install "postgresql-client-${VER_PG}" @@ -24,7 +24,7 @@ setup_mysql_client() { setup_mongosh_client() { # from: https://www.mongodb.com/docs/mongodb-shell/install/ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/6.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-6.0.list - curl -sL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo sudo tee /etc/apt/trusted.gpg.d/mongodb.asc + curl -sL https://www.mongodb.org/static/pgp/server-6.0.asc | sudo tee /etc/apt/trusted.gpg.d/mongodb.asc sudo apt-get update # will download ~38MB files and use ~218MB disk after installation sudo apt-get -y install mongodb-mongosh diff --git a/docker_atom/work/script-setup.sh b/docker_atom/work/script-setup.sh index eca1f09..9ce8804 100644 --- a/docker_atom/work/script-setup.sh +++ b/docker_atom/work/script-setup.sh @@ -80,7 +80,7 @@ setup_tini() { setup_nvtop() { # The compiliation requries CMake 3.18 or higher. default version in CUDA 11.2 images is 3.16.3 - curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo sudo tee /etc/apt/trusted.gpg.d/kitware.asc \ + curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo tee /etc/apt/trusted.gpg.d/kitware.asc \ && echo "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/kitware.list \ && apt-get -qq update -yq --fix-missing && apt-get -qq install -yq --no-install-recommends cmake diff --git a/docker_base/Dockerfile b/docker_base/Dockerfile index 54b89b4..0bc6734 100644 --- a/docker_base/Dockerfile +++ b/docker_base/Dockerfile @@ -13,10 +13,10 @@ RUN set -x && source /opt/utils/script-setup.sh \ && export PATH=$PATH:${CONDA_PREFIX}/bin \ && install_apt /opt/utils/install_list_base.apt \ && echo "Install tini:" && setup_tini \ - && export HAS_SYS_PY=$(which python && echo true || echo false) && echo "Detect OS sys path installed: $HAS_SYS_PY" \ + && export HAS_SYS_PY3=$( [ -x "$(command -v python3)" ] && echo 'true' || echo 'false' ) && echo "@ Detect OS Py3 installed: $HAS_SYS_PY3" \ && echo "Install Mamba:" && setup_mamba \ && echo "Install Python ${PYTHON_VERSION} and conda:" && setup_conda_with_mamba ${PYTHON_VERSION} \ - && $($HAS_SYS_PY) && ( \ + && $($HAS_SYS_PY3) && ( \ echo "Replace system Python3 with conda Python - note that /bin and /sbin are symlinks of /usr/bin in docker image ubuntu" \ && PYTHON_VERSION_DEFAULT=$(py3versions -v -i) \ && sed -i "s/${PYTHON_VERSION_DEFAULT}/${PYTHON_VERSION}/g" /usr/share/python3/debian_defaults \ @@ -24,10 +24,13 @@ RUN set -x && source /opt/utils/script-setup.sh \ && echo "/usr/share/pyshared/" >> "${PYTHON_PTH_FILE}" \ && echo "/usr/share/python3/" >> "${PYTHON_PTH_FILE}" \ && rm -rf $(/usr/bin/python3 -c 'import sys; print(" ".join(i for i in sys.path if "python" in i))') /usr/bin/python3* /usr/lib/python${PYTHON_VERSION} \ - && ln -sf "${CONDA_PREFIX}"/lib/python${PYTHON_VERSION} /usr/lib/ \ - && ln -sf "${CONDA_PREFIX}"/bin/python3.* /usr/bin/ \ - && ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python \ - && ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \ - && lsb_release -a && py3versions -d \ ) || true \ + && ln -sf "${CONDA_PREFIX}"/lib/python${PYTHON_VERSION} /usr/lib/ \ + && ln -sf "${CONDA_PREFIX}"/bin/python3.* /usr/bin/ \ + && ln -sf "${CONDA_PREFIX}"/bin/python${PYTHON_VERSION} /usr/bin/python \ + && ln -sf "${CONDA_PREFIX}"/bin/python${PYTHON_VERSION} /usr/bin/python3 \ + && ls -alh /usr/bin/python* \ + && $($HAS_SYS_PY3) && ( py3versions -d ) || true \ + && lsb_release -a \ + && which python && python --version \ && install__clean && fix_permission 0 /opt