Fix/reproducible local setup - #158
Open
Noaman-Akhtar wants to merge 9 commits into
Open
Conversation
Prevent startup from passing an empty model name to the provider.
Use the supported request-first signature so HTML routes render instead of returning HTTP 500.
Retry verified wheel downloads and pass runtime environment variables into the existing CUDA 12.8 image without baking .env into the image.
Explain environment configuration, CPU and CUDA dependency profiles, and verified commands for starting Sugar-AI locally or with Docker.
Use a Docker-compatible boolean value for DEV_MODE.
Use requirements/cuda.txt for both offline wheel downloads and image installation so Docker stays aligned with the CUDA dependency profile.
Noaman-Akhtar
marked this pull request as ready for review
August 13, 2026 09:31
Contributor
Author
|
@mebinthattil and @chimosky can you review this ? |
Contributor
Author
|
@mebinthattil @chimosky can you please review this pr ? |
chimosky
reviewed
Aug 17, 2026
Comment on lines
+30
to
+31
| torch==2.12.1 \ | ||
| bitsandbytes==0.49.2 \ |
Member
There was a problem hiding this comment.
You could just pass requirements/cuda.txt here, which would make the other args redundant.
Contributor
Author
5 tasks
Member
|
@mebinthattil please test this. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR makes Sugar-AI easier and more reliable to set up and run locally.
It addresses dependency resolution problems, ambiguous model configuration, Docker startup failures, Starlette template incompatibility, and missing setup documentation while preserving the existing CUDA 12.8 Docker behavior.
Problems addressed
Changes
Dependency setup
requirements/base.txt.requirements/cpu.txt.requirements/cuda.txt.requirements.txtselect the CPU profile by default.bitsandbytesopt-in.These are direct dependency pins, not a complete platform-specific lockfile.
Model and provider configuration
Made model selection deterministic:
AI_MODEL, when configured.DEV_MODEL_NAMEwhenDEV_MODE=1.PROD_MODEL_NAMEwhenDEV_MODE=0.Added a clear startup failure when no model is configured.
Updated
.example.envto use the verifiedSmolLM2-135M-Instructdevelopment model.Made
DEV_MODEDocker-compatible:Frontend compatibility
Docker
.envinto the container at runtime instead of baking it into the image.Documentation
Updated the README with a complete setup path covering:
.example.envto.envconfiguration.Verification
Clean CPU installation
A fresh Python 3.12.5 virtual environment was used for verification.
Results:
Local application startup
Sugar-AI was started using the documented development model and repository documentation paths.
Results:
Health response:
{ "status": "healthy", "provider": "HuggingFaceProvider", "model": "HuggingFaceTB/SmolLM2-135M-Instruct" }Docker verification
.example.env.DEV_MODEvalue works with Docker’s environment-file parser.Results:
Known limitation
The verification host does not have an NVIDIA driver.
Therefore:
torch.cuda.is_available() == Truecould not be tested.GPU hardware validation should be performed separately on an NVIDIA-equipped host.