Dockerfile and setup.sh fail for certain examples and on Windows environments
Hi team! While exploring the repository, I found two bugs related to how examples are built and set up.
1. Dockerfile fails to build for examples without a requirements.txt
The root Dockerfile unconditionally tries to copy the requirements file on line 12:
COPY ${EXAMPLE}/requirements.txt ./requirements.txt
However, several example directories (like web3, mcp-agents, and gemini-quickstart) do not have a requirements.txt file at their root level. If a user tries to build the Docker image for these examples, the build will immediately crash with a file not found error.
Suggested Fix
Update the Dockerfile to conditionally copy and install requirements.txt only if it exists, or ensure every example directory contains one.
2. setup.sh fails on Windows (Git Bash)
In setup.sh on line 90, the virtual environment is activated using a hardcoded path:
source .venv/bin/activate
If a Windows user runs this script using Git Bash or MSYS2, Python creates a Scripts directory instead of bin. This causes the script to fail with a No such file or directory error.
Suggested Fix
Check for both paths before sourcing:
if [[ -f ".venv/bin/activate" ]]; then
source .venv/bin/activate
elif [[ -f ".venv/Scripts/activate" ]]; then
source .venv/Scripts/activate
fi
Let me know if you'd like me to submit a Pull Request to address these issues.
Dockerfileandsetup.shfail for certain examples and on Windows environmentsHi team! While exploring the repository, I found two bugs related to how examples are built and set up.
1.
Dockerfilefails to build for examples without arequirements.txtThe root
Dockerfileunconditionally tries to copy the requirements file on line 12:COPY ${EXAMPLE}/requirements.txt ./requirements.txtHowever, several example directories (like
web3,mcp-agents, andgemini-quickstart) do not have arequirements.txtfile at their root level. If a user tries to build the Docker image for these examples, the build will immediately crash with a file not found error.Suggested Fix
Update the
Dockerfileto conditionally copy and installrequirements.txtonly if it exists, or ensure every example directory contains one.2.
setup.shfails on Windows (Git Bash)In
setup.shon line 90, the virtual environment is activated using a hardcoded path:source .venv/bin/activateIf a Windows user runs this script using Git Bash or MSYS2, Python creates a
Scriptsdirectory instead ofbin. This causes the script to fail with aNo such file or directoryerror.Suggested Fix
Check for both paths before sourcing:
Let me know if you'd like me to submit a Pull Request to address these issues.