-
Notifications
You must be signed in to change notification settings - Fork 1
feat(load-balancer): implement Live Load Balancer runtime Docker infrastructure #45
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
191f00e
feat(load-balancer): implement Live Load Balancer runtime Docker infr…
deanq 2b41e85
feat(load-balancer-cpu): add CPU-only Load Balancer Docker support
deanq 2686597
fix(load-balancer): correct CMD to reference lb_handler instead of ha…
deanq 60458d6
refactor(lb-handler): simplify to single /ping endpoint
deanq 46cefb1
fix: use port 80 for Load Balancer worker (RunPod default)
deanq 6f095d7
fix: use port 80 in development server
deanq 128ddf3
fix(load-balancer): standardize port configuration to 80 across test …
deanq 078bd00
fix(load-balancer): update diagram port reference from 8000 to 80
deanq 7be6f36
chore: update tetra-rp submodule to deanq/ae-1196-absolute-drift-dete…
deanq 0119257
fix(dependency-installer): add --python flag for Docker uv pip install
deanq fbde250
fix(dependency-installer): add --python flag for Docker uv pip install
deanq 9dbb9a2
Merge branch 'deanq/ae-1102-live-load-balancer' of https://github.com…
deanq 4873ed5
fix(dependency-installer): simplify Docker installation with differen…
deanq a227a9f
Merge branch 'deanq/ae-1102-live-load-balancer' of https://github.com…
deanq e25f033
revert(dependency-installer): revert to main version
deanq 89b1f28
fix(test-handler): use direct python execution in Docker, uv run locally
deanq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| FROM pytorch/pytorch:2.8.0-cuda12.8-cudnn9-runtime | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Prevent interactive prompts during package installation | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| # Set timezone to avoid tzdata prompts | ||
| ENV TZ=Etc/UTC | ||
|
|
||
| # Enable HuggingFace transfer acceleration | ||
| ENV HF_HUB_ENABLE_HF_TRANSFER=1 | ||
| # Relocate HuggingFace cache outside /root/.cache to exclude from volume sync | ||
| ENV HF_HOME=/hf-cache | ||
|
|
||
| # Configure APT cache to persist under /root/.cache for volume sync | ||
| RUN mkdir -p /root/.cache/apt/archives/partial \ | ||
| && echo 'Dir::Cache "/root/.cache/apt";' > /etc/apt/apt.conf.d/01cache | ||
|
|
||
| # Install system dependencies and uv | ||
| RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential curl ca-certificates nala git \ | ||
| && curl -LsSf https://astral.sh/uv/install.sh | sh \ | ||
| && cp ~/.local/bin/uv /usr/local/bin/uv \ | ||
| && chmod +x /usr/local/bin/uv \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Copy app code and install dependencies | ||
| COPY README.md pyproject.toml uv.lock ./ | ||
| COPY src/ ./ | ||
| RUN uv export --format requirements-txt --no-dev --no-hashes > requirements.txt \ | ||
| && uv pip install --system -r requirements.txt | ||
|
|
||
| EXPOSE 80 | ||
|
|
||
| # CMD will be overridden by RunPod at runtime to run the specific generated handler | ||
| # The handler factory generates handler_{resource_name}.py files | ||
| # RunPod will invoke: uvicorn handler_{resource_name}:app --host 0.0.0.0 --port 80 | ||
| CMD ["uvicorn", "lb_handler:app", "--host", "0.0.0.0", "--port", "80", "--timeout-keep-alive", "600"] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.