Unable to set environment variables - OLLAMA_NUM_PARALLEL, OLLAMA_NUM_GPU, and OLLAMA_NUM_THREAD #195

Open
opened 2026-02-15 16:28:38 -05:00 by yindo · 3 comments
Owner

Originally created by @harshachopra507 on GitHub (Dec 31, 2024).

I have set os.environ["OLLAMA_NUM_PARALLEL"] = "4" through python script, but it is not running parallely 4 LLM requests.

Please help me with this issue.

Originally created by @harshachopra507 on GitHub (Dec 31, 2024). I have set os.environ["OLLAMA_NUM_PARALLEL"] = "4" through python script, but it is not running parallely 4 LLM requests. Please help me with this issue.
Author
Owner

@ParthSareen commented on GitHub (Jan 21, 2025):

Could you show the snippet of code you're making requests with?

@ParthSareen commented on GitHub (Jan 21, 2025): Could you show the snippet of code you're making requests with?
Author
Owner

@ckuethe commented on GitHub (Apr 12, 2025):

@harshachopra507 those OLLAMA_ environment variables are for the server and are not passed from the python client. Set them the appropriate technique for the way you start ollama serve - in the dockerfile, docker run command, or systemd unit.

@ckuethe commented on GitHub (Apr 12, 2025): @harshachopra507 those `OLLAMA_` environment variables are for the server and are not passed from the python client. Set them the appropriate technique for the way you start `ollama serve` - in the dockerfile, docker run command, or systemd unit.
Author
Owner

@pataquets commented on GitHub (Jun 25, 2025):

Issue gardening.
@harshachopra507: did it work? Can the issue be closed? (let's keep the issue list tidy to help maintainers)

@pataquets commented on GitHub (Jun 25, 2025): Issue gardening. @harshachopra507: did it work? Can the issue be closed? (let's keep the issue list tidy to help maintainers)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#195