From f769a829caed1721b8da57ce2dff24ec33508f0d Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Mon, 11 Mar 2024 08:34:58 -0700 Subject: [PATCH] Sketch out changes necessary for python 3.8 base image Related to https://github.com/deephaven/deephaven-server-docker/issues/71 --- contexts/server-base/Dockerfile | 5 +++-- contexts/server-base/requirements.txt | 6 +++--- server-base.hcl | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/contexts/server-base/Dockerfile b/contexts/server-base/Dockerfile index 9de4fec..290c649 100644 --- a/contexts/server-base/Dockerfile +++ b/contexts/server-base/Dockerfile @@ -28,6 +28,7 @@ RUN \ locales \ fontconfig \ ; \ + apt-get -qq -y install software-properties-common; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8 ENV \ @@ -54,6 +55,7 @@ RUN \ --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-${TARGETARCH}-${UBUNTU_VERSION} \ --mount=type=cache,target=/var/lib/apt,sharing=locked,id=apt-${TARGETARCH}-${UBUNTU_VERSION} \ set -eux; \ + add-apt-repository ppa:deadsnakes/ppa; \ apt-get -qq update; \ apt-get -qq -y --no-install-recommends install \ libpython${PYTHON_VERSION} \ @@ -87,13 +89,12 @@ ARG REQUIREMENTS_TYPE RUN \ --mount=type=bind,source=requirements.txt,target=requirements.txt \ --mount=type=bind,source=type/${REQUIREMENTS_TYPE}/requirements.txt,target=requirements-2.txt \ - --mount=type=bind,from=turbodbc-wheel,source=/wheels,target=/wheels \ --mount=type=cache,target=/root/.cache/pip,sharing=locked \ set -eux; \ mkdir -p /opt/deephaven; \ python${PYTHON_VERSION} -m venv /opt/deephaven/venv; \ /opt/deephaven/venv/bin/pip install --upgrade pip setuptools; \ - /opt/deephaven/venv/bin/pip install --only-binary=:all: --find-links /wheels -r requirements.txt -r requirements-2.txt + /opt/deephaven/venv/bin/pip install --only-binary=:all: -r requirements.txt -r requirements-2.txt ENV \ VIRTUAL_ENV="/opt/deephaven/venv" \ PATH="/opt/deephaven/venv/bin:${PATH}" diff --git a/contexts/server-base/requirements.txt b/contexts/server-base/requirements.txt index c757d04..0b3d0ce 100644 --- a/contexts/server-base/requirements.txt +++ b/contexts/server-base/requirements.txt @@ -21,12 +21,12 @@ java-utilities jedi==0.18.2 # optional adbc feature -adbc-driver-manager -adbc-driver-postgresql +#adbc-driver-manager +#adbc-driver-postgresql # optional turbodbc feature # We are adding the arrow/numpy extra requirements to make sure pip installs compatible versions -turbodbc[arrow,numpy]==4.8.0 +#turbodbc[arrow,numpy]==4.8.0 # optional connectorx feature for x86_64 arch only, no Linux/arm64 wheel yet connectorx; platform.machine == 'x86_64' diff --git a/server-base.hcl b/server-base.hcl index 725814d..337cc90 100644 --- a/server-base.hcl +++ b/server-base.hcl @@ -33,7 +33,7 @@ variable "OPENJDK_VERSION" { } variable "PYTHON_VERSION" { - default = "3.10" + default = "3.8" } variable "UBUNTU_VERSION" { @@ -135,9 +135,9 @@ target "server-base-tensorflow" { target "server-base-context" { context = "contexts/server-base/" - contexts = { - turbodbc-wheel = "target:turbodbc-wheel" - } + // contexts = { + // turbodbc-wheel = "target:turbodbc-wheel" + // } args = { OPENJDK_VERSION = OPENJDK_VERSION PYTHON_VERSION = PYTHON_VERSION