From 23a860cdc09138ca0e0e9f23aeacabb70a29a586 Mon Sep 17 00:00:00 2001 From: Antonio Melillo Date: Mon, 9 Feb 2026 21:44:03 +0100 Subject: [PATCH] fix: Add Python artifacts to .dockerignore Docker build fails when local .venv directory exists because: 1. COPY . /workspaces/serena/ copies .venv into container 2. RUN uv venv fails with 'virtual environment already exists' This change prevents the issue by excluding Python development artifacts: - .venv (virtual environment) - __pycache__ (Python bytecode cache) - *.pyc (compiled Python files) - .pytest_cache (test cache) These files are not needed for Docker builds as the container creates its own clean environment. Co-authored-by: Cursor --- .dockerignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.dockerignore b/.dockerignore index a7c65ec6..237bd3b5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,9 @@ docs/.jupyter_cache docs/_build coverage.xml docker_build_and_run.sh + +# Python artifacts (prevents Docker build conflicts when .venv exists locally) +.venv +__pycache__ +*.pyc +.pytest_cache