From 582a97a362a3074cb2e2a5bd6da0973b41bddcc4 Mon Sep 17 00:00:00 2001 From: stash Date: Wed, 13 Aug 2025 02:32:33 -0700 Subject: [PATCH 1/5] Correct way to build package directly in non-editable mode, no manifest needed --- pyproject.toml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 80ad9f0f7b..a5f2e2163c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,14 @@ requires = ["setuptools>=70", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools] -packages = ["dimos"] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["."] +include = ["dimos*"] + +[tool.setuptools.package-data] +"*" = ["*.html", "*.css", "*.js", "*.json", "*.txt", "*.yaml", "*.yml"] [project] name = "dimos" @@ -135,7 +142,7 @@ cuda = [ "ctransformers[cuda]==0.2.27", "mmengine>=0.10.3", "mmcv>=2.1.0", - "xformers==0.0.20", + "xformers", # Detic GPU stack "mss", From c00cc8529fe1b9a332cebbebaea91353acabe108 Mon Sep 17 00:00:00 2001 From: stash Date: Wed, 13 Aug 2025 02:52:26 -0700 Subject: [PATCH 2/5] Testing proper package builds in docker CI --- docker/dev/Dockerfile | 9 +++------ docker/python/Dockerfile | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 3ecfd013b0..ac3a83a2f4 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -24,20 +24,17 @@ RUN git config --global --add safe.directory '*' WORKDIR /app -COPY pyproject.toml /app/ -RUN mkdir -p /app/dimos -RUN touch /app/dimos/__init__.py - # Install UV for fast Python package management ENV UV_SYSTEM_PYTHON=1 RUN curl -LsSf https://astral.sh/uv/install.sh | sh ENV PATH="/root/.local/bin:$PATH" +# Copy entire project first to ensure proper package installation +COPY . /app/ + # Install dependencies with UV (10-100x faster than pip) RUN uv pip install .[dev] -COPY . /app/ - # Copy files and add version to motd COPY /assets/dimensionalascii.txt /etc/motd COPY /docker/dev/bash.sh /root/.bash.sh diff --git a/docker/python/Dockerfile b/docker/python/Dockerfile index e14a2d7ca7..8acd7a52af 100644 --- a/docker/python/Dockerfile +++ b/docker/python/Dockerfile @@ -44,12 +44,9 @@ ENV PATH="/root/.local/bin:$PATH" WORKDIR /app -COPY pyproject.toml /app/ -RUN mkdir -p /app/dimos -RUN touch /app/dimos/__init__.py +# Copy entire project first to ensure proper package installation +COPY . /app/ # Install dependencies with UV (10-100x faster than pip) RUN uv pip install --upgrade 'pip>=24' 'setuptools>=70' 'wheel' 'packaging>=24' && \ - uv pip install '.[cpu]' - -COPY . /app/ \ No newline at end of file + uv pip install '.[cpu]' \ No newline at end of file From ee430c2765a8871e3a850cba9dd8584ff66b56e2 Mon Sep 17 00:00:00 2001 From: stash Date: Wed, 13 Aug 2025 04:35:40 -0700 Subject: [PATCH 3/5] Added dockerignore for cleaner builds --- .dockerignore | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..72d14322f1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,109 @@ +# Version control +.git +.gitignore +.github/ + +# Editor and IDE files +.vscode +.idea +*.swp +*.swo +.cursor/ +.cursorignore + +# Shell history +.bash_history +.zsh_history +.history + +# Python virtual environments +**/venv/ +**/.venv/ +**/env/ +**/.env/ +**/*-venv/ +**/*_venv/ +**/ENV/ + + +# Python build artifacts +__pycache__/ +*.pyc +*.pyo +*.pyd +.Python +*.egg-info/ +dist/ +build/ +*.so +*.dylib + +# Environment file +.env +.env.local +.env.*.local + +# Large data files +data/* +!data/.lfs/ + +# Model files (can be downloaded at runtime) +*.pt +*.pth +*.onnx +*.pb +*.h5 +*.ckpt +*.safetensors +checkpoints/ +assets/model-cache + +# Logs +*.log + +# Large media files (not needed for functionality) +*.png +*.jpg +*.jpeg +*.gif +*.mp4 +*.mov +*.avi +*.mkv +*.webm +*.MOV + +# Large font files +*.ttf +*.otf + +# Node modules (for dev tools, not needed in container) +node_modules/ +package-lock.json +package.json +bin/node_modules/ + +# Database files +*.db +*.sqlite +*.sqlite3 + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Temporary files +tmp/ +temp/ +*.tmp +.python-version + +# Exclude all assets subdirectories +assets/*/* +!assets/agent/prompt.txt +!assets/* From 1b0a1dc414cc15e0b233e8218ae0d77cfd014685 Mon Sep 17 00:00:00 2001 From: stash Date: Wed, 13 Aug 2025 04:36:32 -0700 Subject: [PATCH 4/5] Changed onnxruntime-gpu pin to support cuda 12.4+, also fix UV install by added xformers lower bound --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a5f2e2163c..7cbde71894 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -138,11 +138,11 @@ cpu = [ cuda = [ "pycuda", - "onnxruntime-gpu>=1.17.1,<=1.18.1", # Only versions supporting both cuda11 and cuda12 + "onnxruntime-gpu>=1.17.1", # Only versions supporting both cuda11 and cuda12 "ctransformers[cuda]==0.2.27", "mmengine>=0.10.3", "mmcv>=2.1.0", - "xformers", + "xformers>=0.0.20", # Detic GPU stack "mss", From 45f47efe87482017f8fbc3885bb556976e97d3f6 Mon Sep 17 00:00:00 2001 From: dimensional5 Date: Wed, 20 Aug 2025 14:57:46 -0700 Subject: [PATCH 5/5] Test remote /app dimos copy in dev dockerfile --- docker/dev/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index ac3a83a2f4..ef80b70e1d 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -29,10 +29,7 @@ ENV UV_SYSTEM_PYTHON=1 RUN curl -LsSf https://astral.sh/uv/install.sh | sh ENV PATH="/root/.local/bin:$PATH" -# Copy entire project first to ensure proper package installation -COPY . /app/ - -# Install dependencies with UV (10-100x faster than pip) +# Install dependencies with UV RUN uv pip install .[dev] # Copy files and add version to motd