great-oil-61627
08/21/2025, 2:10 PMfailed to walk directory: failed to copy file content for .venv/lib64: read .venv/lib: is a directory during lk agent create file compression stagetall-airline-16756
08/21/2025, 2:10 PMtall-airline-16756
08/21/2025, 2:11 PMlk agent create command stumbles upon a symbolic link inside your .venv directory while it's compressing files. To be specific, the symlink .venv/lib64 points to .venv/lib (which is actually a directory), but the CLI tries to read it like it’s a file.
No worries though! To fix this, you just need to exclude the .venv directory from your agent build context. Here’s how you can do it:
• Add .venv to a .dockerignore file:
.venv
venv/
• If you don’t have a .dockerignore file, you can add it to your .gitignore instead:
.venv
venv/
It’s actually a good idea to exclude virtual environment directories like .venv because they contain platform-specific binaries and symlinks, which can bloat your build size. Plus, dependencies are best installed fresh inside the container during the Docker build process.
Sources: complex-agents/nutrition-assistant/.gitignore | agent/.dockerignore | agent/.gitignore | python-agent-example-app/.dockerignore | pkg/agentfs/tar_test.gogreat-oil-61627
08/21/2025, 2:12 PM.venv/
venv/tall-airline-16756
08/21/2025, 2:13 PM.venv in your .dockerignore, and that’s not what's causing the issue. To help you better, could you share the exact error message or logs you get when lk agent create fails? That way, we can figure out what's going on together.
Sources: Builds and Dockerfiles | LiveKit Docs