Skip to content

Commit

Permalink
fix(deps): enable running uv lock command in devcontainer (#10576)
Browse files Browse the repository at this point in the history
## Description of changes

Update devcontainer through build (.devcontainer/Dockerfile) to name the
virtual environment using the default uv virtual environment name
('venv') and activate it.

## Issues closed

Resolves #10575
  • Loading branch information
nickpowersys authored Dec 14, 2024
1 parent e593495 commit caf3daf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --group dev --group tests \
uv venv && uv sync --group dev --group tests \
--extra duckdb --extra clickhouse --extra examples --extra geospatial

ENV VENV_DIR=.venv
Expand All @@ -36,6 +36,8 @@ RUN chown -R $USERNAME $IBIS_PROJECT
# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

SHELL ["/bin/bash", "-c", "source .venv/bin/activate"]

ENTRYPOINT []

USER $USERNAME
3 changes: 2 additions & 1 deletion docs/contribute/01_environment.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,11 @@ for manager, params in managers.items():
1. To exit a container, click the `Dev Container` button on the lower left of the
window and select the last menu option, `Close Remote Connection`.

1. To ensure you have the latest dependencies from the main branch based on
1. To ensure you have the latest dependencies from the main upstream branch based on
`pyproject.toml`:

* Exit any running container.
* Sync your fork.
* From your local Git repo, `git pull origin main`.
* Reopen the project in a new container.
* `Rebuild Container` to copy files from the local Git repo and have the build
Expand Down

0 comments on commit caf3daf

Please sign in to comment.