-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add RLM (Recursive Language Models) sample #4252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Virtual environment | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
|
|
||
| # Git | ||
| .git/ | ||
| .gitignore | ||
|
|
||
| # Python cache | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
| *.so | ||
| .Python | ||
|
|
||
| # Build artifacts | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
|
|
||
| # Testing | ||
| .pytest_cache/ | ||
| .coverage | ||
| htmlcov/ | ||
| .tox/ | ||
| .nox/ | ||
|
|
||
| # IDE | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # Local files | ||
| *.db | ||
| *.sqlite | ||
| logs/ | ||
| *.log | ||
| *.jsonl | ||
|
|
||
| # Documentation | ||
| docs/ | ||
| *.md | ||
| !README.md | ||
| !adk_rlm/**/*.md | ||
|
|
||
| # Tests | ||
| tests/ | ||
|
|
||
| # Examples | ||
| examples/ | ||
|
|
||
| # Deployment scripts (not needed in container) | ||
| deployment/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Python-generated files | ||
| __pycache__/ | ||
| *.py[oc] | ||
| build/ | ||
| dist/ | ||
| wheels/ | ||
| *.egg-info | ||
|
|
||
| # Virtual environments | ||
| .venv | ||
|
|
||
| # Environment files | ||
| .env | ||
| .env.* | ||
|
|
||
| # ADK generated files | ||
| .adk/ | ||
| */.adk/ | ||
|
|
||
| original_rlm/ | ||
| plans/ | ||
| CLAUDE.md | ||
| logs/ | ||
| .pytest_cache/ | ||
| sessions.db | ||
| corpora/ | ||
| *.db | ||
| .ruff_cache/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.12 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| FROM python:3.12-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install uv for faster package management (rarely changes) | ||
| RUN pip install uv | ||
|
|
||
| # Copy only dependency specification first for better caching | ||
| COPY pyproject.toml README.md ./ | ||
|
|
||
| # Create minimal package structure for dependency resolution | ||
| RUN mkdir -p adk_rlm && echo '__version__ = "0.1.0"' > adk_rlm/__init__.py | ||
|
|
||
| # Install dependencies (this layer is cached unless pyproject.toml changes) | ||
| RUN uv pip install --system -e ".[all]" --index-url https://pypi.org/simple/ | ||
|
|
||
| # Now copy the actual source code (changes frequently) | ||
| COPY adk_rlm/ adk_rlm/ | ||
|
|
||
| # Create logs directory | ||
| RUN mkdir -p /app/logs | ||
|
|
||
| # Expose port (Cloud Run uses PORT env var) | ||
| ENV PORT=8080 | ||
| EXPOSE 8080 | ||
|
|
||
| # Run the web server | ||
| CMD ["sh", "-c", "python -m adk_rlm.web --host 0.0.0.0 --port $PORT"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's generally better to use the |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
--systemwithuv pip installinside a Dockerfile is generally not recommended. In a Docker image, the environment is already isolated, so installing into the system Python (even a slim one) bypassesuv's virtual environment management. It's often better to letuvmanage a virtual environment within the container or usepip installdirectly ifuv's virtual environment features aren't strictly needed in the final image layer.