diff --git a/dockers/base-cuda/Dockerfile b/dockers/base-cuda/Dockerfile index 989ff2cda6..ecc3d98e07 100644 --- a/dockers/base-cuda/Dockerfile +++ b/dockers/base-cuda/Dockerfile @@ -25,11 +25,11 @@ ARG MAX_ALLOWED_NCCL=2.16.2 SHELL ["/bin/bash", "-c"] # https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/ ENV \ - DEBIAN_FRONTEND=noninteractive \ - TZ=Europe/Prague \ + DEBIAN_FRONTEND="noninteractive" \ + TZ="Etc/UTC" \ PATH="$PATH:/root/.local/bin" \ CUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda" \ - MKL_THREADING_LAYER=GNU \ + MKL_THREADING_LAYER="GNU" \ # MAKEFLAGS="-j$(nproc)" MAKEFLAGS="-j2" @@ -43,7 +43,7 @@ RUN \ echo "deb [signed-by=/etc/apt/keyrings/3bf863cc.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" /etc/apt/sources.list.d/cuda.list && \ apt-get update -qq --fix-missing && \ NCCL_VER=$(dpkg -s libnccl2 | grep '^Version:' | awk -F ' ' '{print $2}' | awk -F '-' '{print $1}' | grep -ve '^\s*$') && \ - CUDA_VERSION_MM="${CUDA_VERSION%.*}" && \ + CUDA_VERSION_MM=${CUDA_VERSION%.*} && \ TO_INSTALL_NCCL=$(echo -e "$MAX_ALLOWED_NCCL\n$NCCL_VER" | sort -V | head -n1)-1+cuda${CUDA_VERSION_MM} && \ apt-get install -y --no-install-recommends --allow-downgrades --allow-change-held-packages \ build-essential \ @@ -79,9 +79,7 @@ RUN \ COPY ./requirements/pytorch/ ./requirements/pytorch/ COPY ./.actions/assistant.py assistant.py -ENV \ - PYTHONPATH=/usr/lib/python${PYTHON_VERSION}/site-packages \ - TORCH_URL=https://download.pytorch.org/whl/cu${CUDA_VERSION_MM}/torch_stable.html +ENV PYTHONPATH="/usr/lib/python${PYTHON_VERSION}/site-packages" RUN \ wget https://bootstrap.pypa.io/get-pip.py --progress=bar:force:noscroll --no-check-certificate && \ @@ -96,15 +94,19 @@ RUN \ python ./requirements/pytorch/adjust-versions.py $fpath ${PYTORCH_VERSION}; \ done && \ + rm assistant.py && \ # Install base requirements \ - pip install -r requirements/pytorch/base.txt --no-cache-dir --find-links ${TORCH_URL} && \ - rm assistant.py + CUDA_VERSION_MM=${CUDA_VERSION%.*} && \ + pip install -r requirements/pytorch/base.txt \ + --no-cache-dir --find-links "https://download.pytorch.org/whl/cu${CUDA_VERSION_MM//'.'/''}/torch_stable.html" RUN \ # install rest of strategies + CUDA_VERSION_MM=${CUDA_VERSION%.*} && \ cat requirements/pytorch/strategies.txt && \ - pip install -r requirements/pytorch/devel.txt -r requirements/pytorch/strategies.txt --no-cache-dir --find-links ${TORCH_URL} + pip install -r requirements/pytorch/devel.txt -r requirements/pytorch/strategies.txt \ + --no-cache-dir --find-links "https://download.pytorch.org/whl/cu${CUDA_VERSION_MM//'.'/''}/torch_stable.html" COPY requirements/pytorch/check-avail-extras.py check-avail-extras.py COPY requirements/pytorch/check-avail-strategies.py check-avail-strategies.py diff --git a/dockers/base-ipu/Dockerfile b/dockers/base-ipu/Dockerfile index 34772bc7b3..1d26798360 100644 --- a/dockers/base-ipu/Dockerfile +++ b/dockers/base-ipu/Dockerfile @@ -24,8 +24,8 @@ SHELL ["/bin/bash", "-c"] # for skipping configurations ENV \ - DEBIAN_FRONTEND=noninteractive \ - CONDA_ENV=lightning + DEBIAN_FRONTEND="noninteractive" \ + CONDA_ENV="lightning" RUN apt-get update -qq --fix-missing && \ apt-get install -y --no-install-recommends \ @@ -68,11 +68,11 @@ RUN conda create -y --name $CONDA_ENV && \ rm environment.yml ENV \ - PATH=/root/miniconda3/envs/${CONDA_ENV}/bin:$PATH \ + PATH="/root/miniconda3/envs/${CONDA_ENV}/bin:$PATH" \ LD_LIBRARY_PATH="/root/miniconda3/envs/${CONDA_ENV}/lib:$LD_LIBRARY_PATH" \ # if you want this environment to be the default one, uncomment the following line: CONDA_DEFAULT_ENV=${CONDA_ENV} \ - MKL_THREADING_LAYER=GNU + MKL_THREADING_LAYER="GNU" # Disable cache RUN pip --version && \ diff --git a/dockers/base-xla/Dockerfile b/dockers/base-xla/Dockerfile index d40f7baa31..fd035a68b5 100644 --- a/dockers/base-xla/Dockerfile +++ b/dockers/base-xla/Dockerfile @@ -24,8 +24,8 @@ ARG XLA_VERSION=1.12 SHELL ["/bin/bash", "-c"] # for skipping configurations ENV \ - DEBIAN_FRONTEND=noninteractive \ - CONDA_ENV=lightning + DEBIAN_FRONTEND="noninteractive" \ + CONDA_ENV="lightning" # show system info RUN lsb_release -a && cat /etc/*-release @@ -69,7 +69,7 @@ RUN conda create -y --name $CONDA_ENV && \ rm environment.yml ENV \ - PATH=/root/miniconda3/envs/${CONDA_ENV}/bin:$PATH \ + PATH="/root/miniconda3/envs/${CONDA_ENV}/bin:$PATH" \ LD_LIBRARY_PATH="/root/miniconda3/envs/${CONDA_ENV}/lib:$LD_LIBRARY_PATH" \ # if you want this environment to be the default one, uncomment the following line: CONDA_DEFAULT_ENV=${CONDA_ENV} diff --git a/dockers/ci-runner-hpu/Dockerfile b/dockers/ci-runner-hpu/Dockerfile index b5bdde454b..55b99042d5 100644 --- a/dockers/ci-runner-hpu/Dockerfile +++ b/dockers/ci-runner-hpu/Dockerfile @@ -29,7 +29,7 @@ RUN \ # To make it easier for build and release pipelines to run apt-get, # configure apt to not require confirmation (assume the -y argument by default) -ENV DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND="noninteractive" RUN echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes RUN apt-get update --fix-missing && \ diff --git a/dockers/docs/Dockerfile b/dockers/docs/Dockerfile index e05c17fe57..87ce8287ad 100644 --- a/dockers/docs/Dockerfile +++ b/dockers/docs/Dockerfile @@ -19,8 +19,8 @@ LABEL maintainer="Lightning-AI " SHELL ["/bin/bash", "-c"] # https://techoverflow.net/2019/05/18/how-to-fix-configuring-tzdata-interactive-input-when-building-docker-images/ ENV \ - DEBIAN_FRONTEND=noninteractive \ - TZ=Europe/Prague \ + DEBIAN_FRONTEND="noninteractive" \ + TZ="Etc/UTC" \ PATH="$PATH:/root/.local/bin" \ # MAKEFLAGS="-j$(nproc)" MAKEFLAGS="-j2"