From a10689201554fac45e53c23d49821fb93f2a7b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20P=C3=BDrek?= Date: Thu, 22 Jan 2026 16:53:11 +0100 Subject: [PATCH 1/2] feat: remove python 3.9 --- .circleci/config.yml | 7 +- ir/ir-base/Dockerfile.ir | 2 +- python/conda/Dockerfile.conda | 2 +- python/python/Dockerfile.python3.9 | 111 ----------------------------- python/readme.md | 8 +-- 5 files changed, 9 insertions(+), 121 deletions(-) delete mode 100644 python/python/Dockerfile.python3.9 diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a95393..58c3e37 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -261,7 +261,7 @@ jobs: type: string python-version: type: string - default: "3.9" + default: "3.10" environment: R_VERSION: << parameters.r-version >> PYTHON_VERSION: << parameters.python-version >> @@ -306,7 +306,7 @@ jobs: type: string python-version: type: string - default: "3.9" + default: "3.10" environment: R_VERSION: << parameters.r-version >> PYTHON_VERSION: << parameters.python-version >> @@ -439,7 +439,6 @@ jobs: - convert_image_to_soci_v2 python-versions: &python-versions - - "3.9" - "3.10" - "3.11" - "3.12" @@ -484,7 +483,7 @@ workflows: parameters: r-version: *r-versions requires: - - Python 3.9 + - Python 3.10 - build-and-push-ir: name: R << matrix.r-version >> matrix: diff --git a/ir/ir-base/Dockerfile.ir b/ir/ir-base/Dockerfile.ir index 1de679a..274ea6c 100644 --- a/ir/ir-base/Dockerfile.ir +++ b/ir/ir-base/Dockerfile.ir @@ -1,5 +1,5 @@ # Define build arguments for Python and R versions -ARG PYTHON_VERSION=3.9 +ARG PYTHON_VERSION=3.10 # Use the specified Python version as the base image FROM deepnote/python:${PYTHON_VERSION} diff --git a/python/conda/Dockerfile.conda b/python/conda/Dockerfile.conda index 7d7724d..b615a57 100644 --- a/python/conda/Dockerfile.conda +++ b/python/conda/Dockerfile.conda @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.9 +ARG PYTHON_VERSION=3.10 ARG CIRCLE_PULL_REQUEST FROM deepnote/python:base diff --git a/python/python/Dockerfile.python3.9 b/python/python/Dockerfile.python3.9 deleted file mode 100644 index 93f3e6f..0000000 --- a/python/python/Dockerfile.python3.9 +++ /dev/null @@ -1,111 +0,0 @@ -## WARNING: This image is plane copy of: -## https://github.com/docker-library/python/blob/7c8595e8e2b1c8bca0b6d9d146675b94c2a37ec7/3.9/bullseye/Dockerfile -## This is temporary solution and we come with proper solution in the future. -## Ticket: https://linear.app/deepnote/issue/PLA-3219/cleanup-build-pipeline-for-deepnote-python-images - - - -ARG CIRCLE_PULL_REQUEST -FROM deepnote/python:base${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}} -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed -# last attempted removal of LANG broke many users: -# https://github.com/docker-library/python/pull/570 -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libbluetooth-dev \ - tk-dev \ - uuid-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 -ENV PYTHON_VERSION 3.9.20 - -RUN set -eux; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --with-ensurepip \ - ; \ - nproc="$(nproc)"; \ - EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ - LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ -# enable GDB to load debugging data: https://github.com/docker-library/python/pull/701 - bin="$(readlink -ve /usr/local/bin/python3)"; \ - dir="$(dirname "$bin")"; \ - mkdir -p "/usr/share/gdb/auto-load/$dir"; \ - cp -vL Tools/gdb/libpython.py "/usr/share/gdb/auto-load/$bin-gdb.py"; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - ldconfig; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - python3 --version; \ - \ - pip3 install \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - 'setuptools==58.1.0' \ - wheel \ - ; \ - pip3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pip3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done diff --git a/python/readme.md b/python/readme.md index 2284fdf..e3c51ad 100644 --- a/python/readme.md +++ b/python/readme.md @@ -2,8 +2,8 @@ - **Maintained by**: [Deepnote](https://deepnote.com/) # Supported Tags and Respective Dockerfile Links -- [`3.9`, `3.10`, `3.11`, `3.12`, `3.13`](https://github.com/deepnote/environments/tree/main/python/python) -- [`3.9-datascience`, `3.10-datascience`, `3.11-datascience`, `3.12-datascience`, `3.13-datascience`](https://github.com/deepnote/environments/blob/main/python/datascience/Dockerfile.datascience) +- [`3.10`, `3.11`, `3.12`, `3.13`](https://github.com/deepnote/environments/tree/main/python/python) +- [`3.10-datascience`, `3.11-datascience`, `3.12-datascience`, `3.13-datascience`](https://github.com/deepnote/environments/blob/main/python/datascience/Dockerfile.datascience) # What is Deepnote Python? Deepnote Python is a set of Docker images tailored for use in the Deepnote platform. These images are based on the official [Python Docker images](https://hub.docker.com/_/python) and include additional binaries and configurations to enhance the user experience within Deepnote. They are designed to simplify development workflows, especially for data science projects, by providing pre-configured environments that are ready to use. @@ -14,7 +14,7 @@ Deepnote Python is a set of Docker images tailored for use in the Deepnote platf To create a custom Dockerfile using Deepnote's Python image, you can start with the following template: ```dockerfile -ARG PYTHON_VERSION=3.9 +ARG PYTHON_VERSION=3.10 FROM deepnote/python:$PYTHON_VERSION #Determine the Python version and set the version-specifications file @@ -24,7 +24,7 @@ COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt -c https://tk.deepnote.com/constraints${PYTHON_VERSION}.txt ``` -This Dockerfile uses the `deepnote/python:3.9` image as a base and installs Python packages specified in requirements.txt. The use of constraints from `https://tk.deepnote.com/constraints.txt` ensures compatibility and stability of package installations. +This Dockerfile uses the `deepnote/python:3.10` image as a base and installs Python packages specified in requirements.txt. The use of constraints from `https://tk.deepnote.com/constraints.txt` ensures compatibility and stability of package installations. # Additional Information These images are intended to serve as a starting point for creating reproducible and scalable data science environments in Deepnote. They include various utilities and binaries that streamline workflows, such as Jupyter support, data visualization tools, and more. From 7db4bfb8b2aa7fa6e98ac7fb6efa51ab1d8de8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20P=C3=BDrek?= Date: Fri, 23 Jan 2026 17:22:09 +0100 Subject: [PATCH 2/2] fix: increase the CI timeouts --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b65b044..9ede401 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,7 +77,7 @@ commands: steps: - run: name: Retag image and push SOCI v1 index - no_output_timeout: 30m + no_output_timeout: 60m command: | set -euxo pipefail @@ -109,7 +109,7 @@ commands: steps: - run: name: Convert and push SOCI v2 image - no_output_timeout: 30m + no_output_timeout: 60m command: | set -euxo pipefail @@ -228,7 +228,7 @@ jobs: } >> "$BASH_ENV" - run: name: Build and push python-datascience image - no_output_timeout: 30m + no_output_timeout: 60m command: | docker buildx build \ --file=./python/datascience/Dockerfile.datascience \ @@ -317,7 +317,7 @@ jobs: } >> "$BASH_ENV" - run: name: Build and push ir image - no_output_timeout: 60m + no_output_timeout: 90m command: | docker buildx build \ --file=./ir/ir-base/Dockerfile.ir \ @@ -365,7 +365,7 @@ jobs: } >> "$BASH_ENV" - run: name: Build and push ir with datascience libraries - no_output_timeout: 60m + no_output_timeout: 90m command: | docker buildx build \ --file=./ir/ir-with-libs/Dockerfile.ir \ @@ -418,7 +418,7 @@ jobs: } >> "$BASH_ENV" - run: name: Build and push gpu legacy image - no_output_timeout: 30m + no_output_timeout: 60m command: | docker buildx build \ --file=./gpu/Dockerfile.legacy \ @@ -465,7 +465,7 @@ jobs: } >> "$BASH_ENV" - run: name: Build and push gpu image - no_output_timeout: 30m + no_output_timeout: 60m command: | docker buildx build \ --file=./gpu/Dockerfile \