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
{{ message }}
Repository navigation
VS Code settings possibly using uv virtual environment Python interpreter #13
To be discussed: eg. "python.defaultInterpreterPath": "/usr/local/bin/python",
--> "python.defaultInterpreterPath": "/workspace/exopet/.venv/bin/python",
Need to add this line to the container file: export UV_PROJECT_ENVIRONMENT=/usr/local/
(else uv sync creates a virtual environment), and re-publish the image
Also need to make PROJECT_ROOT available in post-create.sh (add PROJECT_ROOT="/workspace/exopet")
With this setup, one can then use a project with a pyproject.toml file and uv.lock file, and install dependencies from myproject.toml in the post-create.sh by setting:
# Install dependencies from pyproject.toml
cd $PROJECT_ROOT
uv sync
and while in the container, one can add any new package by doing
Activity
c-vigo commentedon Dec 10, 2025
Why would you want a virtual environment when you can use the devcontainer one?
irenecortinovis commentedon Dec 12, 2025
Need to add this line to the container file:
export UV_PROJECT_ENVIRONMENT=/usr/local/(else uv sync creates a virtual environment), and re-publish the image
Also need to make
PROJECT_ROOTavailable inpost-create.sh(addPROJECT_ROOT="/workspace/exopet")With this setup, one can then use a project with a
pyproject.tomlfile anduv.lockfile, and install dependencies frommyproject.tomlin thepost-create.shby setting:and while in the container, one can add any new package by doing