diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 80124bb..f566e02 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -82,4 +82,5 @@ jobs: PYTHON_VERSION=${{ matrix.python_version }} UBUNTU_VERSION=${{ matrix.ubuntu_version }} MIN_NVIDIA_DRIVER=${{ matrix.min_nvidia_driver }} + CONDA_PACKAGES=${{ matrix.conda_packages }} tags: ${{ matrix.docker_tags }} diff --git a/Dockerfile b/Dockerfile index 1bb3c6b..2ee0fb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ ARG PYTHON_VERSION=3.10 ARG UBUNTU_VERSION=22.04 ARG MIN_NVIDIA_DRIVER=555.42.06 ARG MINIFORGE_VERSION=25.3.1-0 +ARG CONDA_PACKAGES="ipywidgets jupyterlab micromamba notebook pip" LABEL org.opencontainers.image.base.name="${BASE_IMAGE}" \ ai.dgu.decs.variant="${DECS_IMAGE_VARIANT}" \ @@ -87,13 +88,7 @@ ENV PATH=/opt/conda/bin:$PATH RUN conda config --system --set channel_priority strict \ && conda config --system --add channels conda-forge \ - && conda install -n base -y \ - "python=${PYTHON_VERSION}" \ - ipywidgets \ - jupyterlab \ - micromamba \ - notebook \ - pip \ + && conda install -n base -y "python=${PYTHON_VERSION}" ${CONDA_PACKAGES} \ && python -m pip install --no-cache-dir --upgrade pip \ && python -m pip install --no-cache-dir "${TENSORFLOW_PACKAGE}" \ && conda clean -afy \ diff --git a/image-variants.json b/image-variants.json index 9c59ab5..b3d818f 100644 --- a/image-variants.json +++ b/image-variants.json @@ -12,6 +12,7 @@ "cuda_version": "11.8", "tensorflow_version": "2.13.0", "tensorflow_package": "tensorflow==2.13.0", + "conda_packages": "typing_extensions=4.5 ipython<8.15 jupyterlab<4 notebook<7 ipywidgets<8 micromamba pip", "python_version": "3.10", "ubuntu_version": "22.04", "min_nvidia_driver": "520.61.05", @@ -27,6 +28,7 @@ "cuda_version": "12.2", "tensorflow_version": "2.15.0", "tensorflow_package": "tensorflow==2.15.0", + "conda_packages": "ipywidgets jupyterlab micromamba notebook pip", "python_version": "3.10", "ubuntu_version": "22.04", "min_nvidia_driver": "535.104.05", @@ -41,6 +43,7 @@ "cuda_version": "12.5", "tensorflow_version": "2.20.0", "tensorflow_package": "tensorflow==2.20.0", + "conda_packages": "ipywidgets jupyterlab micromamba notebook pip", "python_version": "3.10", "ubuntu_version": "22.04", "min_nvidia_driver": "555.42.06", @@ -57,6 +60,7 @@ "cuda_version": "12.8", "tensorflow_version": "2.20.0", "tensorflow_package": "tensorflow==2.20.0", + "conda_packages": "ipywidgets jupyterlab micromamba notebook pip", "python_version": "3.10", "ubuntu_version": "22.04", "min_nvidia_driver": "570.124.06", diff --git a/scripts/build_variants.py b/scripts/build_variants.py index e70c56d..074c065 100755 --- a/scripts/build_variants.py +++ b/scripts/build_variants.py @@ -17,6 +17,7 @@ ("PYTHON_VERSION", "python_version"), ("UBUNTU_VERSION", "ubuntu_version"), ("MIN_NVIDIA_DRIVER", "min_nvidia_driver"), + ("CONDA_PACKAGES", "conda_packages"), ] diff --git a/tests/ansible/decs_image_build.yml b/tests/ansible/decs_image_build.yml index 1aafbe8..62bbdcf 100644 --- a/tests/ansible/decs_image_build.yml +++ b/tests/ansible/decs_image_build.yml @@ -15,6 +15,7 @@ python_version: "3.10" ubuntu_version: "22.04" min_nvidia_driver: "555.42.06" + conda_packages: "ipywidgets jupyterlab micromamba notebook pip" tasks: - name: Recreate remote build directory @@ -46,6 +47,7 @@ --build-arg PYTHON_VERSION={{ python_version | quote }} \ --build-arg UBUNTU_VERSION={{ ubuntu_version | quote }} \ --build-arg MIN_NVIDIA_DRIVER={{ min_nvidia_driver | quote }} \ + --build-arg CONDA_PACKAGES={{ conda_packages | quote }} \ -t {{ image_repository }}:{{ image_tag }} \ . args: