From ffad46b1b691805ac440d118ea09e404a7d9a0e3 Mon Sep 17 00:00:00 2001 From: Piotr Lachert Date: Fri, 24 Oct 2025 11:42:14 +0200 Subject: [PATCH 1/2] Use uv image --- src/surveily.developer.ai/base/Dockerfile | 130 ++-------------------- 1 file changed, 8 insertions(+), 122 deletions(-) diff --git a/src/surveily.developer.ai/base/Dockerfile b/src/surveily.developer.ai/base/Dockerfile index e78fda5..109e0e9 100644 --- a/src/surveily.developer.ai/base/Dockerfile +++ b/src/surveily.developer.ai/base/Dockerfile @@ -1,132 +1,18 @@ -ARG PY_VERSION=3.11 -FROM mcr.microsoft.com/devcontainers/python:${PY_VERSION} +FROM ghcr.io/astral-sh/uv:python3.11-trixie-slim USER root -RUN usermod -u 1001 vscode && \ - groupmod -g 1001 vscode - -RUN apt-get -yq update \ - && apt-get -yq install --no-install-recommends \ +RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ - git \ - vim \ - zip \ - bash \ - sudo \ - wget \ - curl \ - nano \ - bzip2 \ - rsync \ - unzip \ - gnupg \ + build-essential \ + libc-dev \ ffmpeg \ - tzdata \ libsm6 \ - gnupg2 \ - locales \ - libxext6 \ - libc-dev \ - lsb-release \ - iputils-ping \ python3-opencv \ - openssh-client \ + libxext6 \ + tzdata \ + locales \ ca-certificates \ - build-essential \ - apt-transport-https \ - software-properties-common \ - # Clean up - && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ - && locale-gen \ - && export GNUPGHOME=/tmp/ - -# Install Kubernetes CLI -RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ - && chmod +x kubectl \ - && mv kubectl /usr/local/bin/ - -# Install Helm -RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash - -USER vscode - -# WARNING! -# Change ultralytics version with great care, due -# to different problems: -# - DDP -# - DDP logging callbacks -# - Runtime parameters -RUN python3 -m pip install -U pip && \ - python3 -m pip install --user --quiet --no-cache-dir \ - torch==2.5.1 \ - torchvision==0.20.1 \ - ultralytics==8.3.34 \ - huggingface_hub==0.18.0 - -RUN python3 -m pip install --user --quiet --no-cache-dir \ - minio \ - mlflow \ - apache-airflow \ - apache-airflow-providers-cncf-kubernetes - -RUN python3 -m pip install --user --quiet --no-cache-dir \ - flytekit \ - flytekitplugins-pod \ - flytekitplugins-omegaconf - -RUN python3 -m pip install --user --quiet --no-cache-dir \ - tqdm \ - ruff \ - mypy \ - black \ - scipy \ - numpy \ - mkinit\ - pandas \ - pynvml \ - p_tqdm \ - pytest \ - plotly \ - seaborn \ - shapely \ - openpyxl \ - ipykernel \ - papermill \ - nbconvert \ - xmltodict \ - autoflake \ - lightning==2.4.0 \ - streamlit \ - imagehash \ - pytest-cov \ - ipywidgets \ - pre-commit \ - types-tqdm \ - hydra-core \ - tensorboard \ - pytest-mock \ - distinctipy \ - pandas-stubs \ - scikit-image \ - types-PyYaml \ - types-Pillow \ - scikit-learn \ - python-dotenv \ - opencv-python \ - types-requests \ - albumentations \ - types-xmltodict \ - pydantic==2.6.0 \ - cvat-sdk==2.21 \ - matplotlib==3.9.2 \ - dependency-injector \ - tensorrt==8.6.1.post1 \ - tritonclient[all]==2.41.1 \ - aiofile==3.8.8 \ - aiofiles==23.2.1 \ - aiobotocore==2.13.0 \ - numba==0.61.0 \ - decord==0.6.0 \ \ No newline at end of file + && locale-gen \ No newline at end of file From 1f4fbdc4e259b23924783bf151c78c7c39332ad5 Mon Sep 17 00:00:00 2001 From: Piotr Lachert Date: Fri, 24 Oct 2025 13:17:07 +0200 Subject: [PATCH 2/2] Add curl and ssh --- src/surveily.developer.ai/base/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/surveily.developer.ai/base/Dockerfile b/src/surveily.developer.ai/base/Dockerfile index 109e0e9..ae5c34f 100644 --- a/src/surveily.developer.ai/base/Dockerfile +++ b/src/surveily.developer.ai/base/Dockerfile @@ -3,6 +3,8 @@ FROM ghcr.io/astral-sh/uv:python3.11-trixie-slim USER root RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + ssh \ gcc \ build-essential \ libc-dev \