You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Docker is what it is and given how well caching in it works, I like to install my applications in two steps.
First, the dependencies:
COPY pyproject.toml /_lock
COPY pdm.lock /_lock
RUN --mount=type=cache,target=/root/.cache \
set -ex \
&& cd /_lock \
&& pdm use -i /app/bin/python \
&& pdm sync --no-self --prod
Note, that the source is not copied; as long as the lock file doesn't change, this layer is cached and this is the layer that takes the longest to build.
And then the app:
COPY . /src
RUN --mount=type=cache,target=/root/.cache \
set -ex \
&& uv pip install --python /app/bin/$PY --no-deps /src
Which is Blazing Fast™ already.
It would be great if something like this were possible with uv sync.
The text was updated successfully, but these errors were encountered:
Aw yeah sorry, looks like I searched for the wrong terms and they know. :| Looks like it depends from what side one comes and I don't know Poetry's flags. ;)
Since Docker is what it is and given how well caching in it works, I like to install my applications in two steps.
First, the dependencies:
Note, that the source is not copied; as long as the lock file doesn't change, this layer is cached and this is the layer that takes the longest to build.
And then the app:
Which is Blazing Fast™ already.
It would be great if something like this were possible with
uv sync
.The text was updated successfully, but these errors were encountered: