Skip to content

Commit d970225

Browse files
authored
Merge pull request #513 - UV implemented in docker devcontainer
Testing UV builds in docker
2 parents 3a70401 + a8abcc1 commit d970225

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

docker/dev/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ COPY pyproject.toml /app/
2828
RUN mkdir -p /app/dimos
2929
RUN touch /app/dimos/__init__.py
3030

31-
# Install dependencies
32-
RUN --mount=type=cache,target=/root/.cache/pip pip install .[dev]
31+
# Install UV for fast Python package management
32+
ENV UV_SYSTEM_PYTHON=1
33+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
34+
ENV PATH="/root/.local/bin:$PATH"
35+
36+
# Install dependencies with UV (10-100x faster than pip)
37+
RUN uv pip install .[dev]
3338

3439
COPY . /app/
3540

docker/python/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ RUN apt-get install -y \
3737
# Fix distutils-installed packages that block pip upgrades
3838
RUN apt-get purge -y python3-blinker python3-sympy python3-oauthlib || true
3939

40+
# Install UV for fast Python package management
41+
ENV UV_SYSTEM_PYTHON=1
42+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
43+
ENV PATH="/root/.local/bin:$PATH"
44+
4045
WORKDIR /app
4146

4247
COPY pyproject.toml /app/
4348
RUN mkdir -p /app/dimos
4449
RUN touch /app/dimos/__init__.py
4550

46-
# Install dependencies
47-
RUN --mount=type=cache,target=/root/.cache/pip bash -c "pip install --upgrade 'pip>=24' 'setuptools>=70' 'wheel' 'packaging>=24' && pip install '.[cpu]'"
51+
# Install dependencies with UV (10-100x faster than pip)
52+
RUN uv pip install --upgrade 'pip>=24' 'setuptools>=70' 'wheel' 'packaging>=24' && \
53+
uv pip install '.[cpu]'
4854

4955
COPY . /app/

0 commit comments

Comments
 (0)