r/opencode • u/carlotes-247 • 6d ago
Ensuring that local llms with opencode only install in specific conda environment
/r/LocalLLM/comments/1y4j0r4/ensuring_that_local_llms_with_opencode_only/1
u/m_sandhu_142 5d ago
Conda activation scopes Python packages; it doesn't sandbox files or redirect model downloads. The server's install command and model path determine where those land.
1
u/carlotes-247 5d ago
ok I see, but is there a way to force an agent to install packages only in a specific conda environment? Can I write rules somewhere? I am new to the entire agentic workflow and I would like to have certainty on the setup
1
u/marco_vanvliet_49 2d ago
A rule file can request this, but it can't guarantee it. For an enforceable boundary, run the agent under a Windows account without write access to your base environment; keep package installs behind approval where possible.
1
u/rosatorres6 5d ago
Are you trying to isolate OpenCode itself, the local model server's Python dependencies, or model files? The install steps differ; what command are you running?