mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
aider: Add port forwarding for the client inside the container to connect to the Ollama server on the host.
# Aider chat conversation: USER: add a port fwd so a client inside the contain can connect to the ollama server running on the host ASSISTANT: To forward a port so that a client inside the container can connect to the Ollama server running on the host, you need to add a `--publish` or `-p` option to the `docker run` command in the `benchmark/docker.sh` script. This option takes the format `host_port:container_port`. Assuming the Ollama server is running on port 12345 on the host, and you want to use the same port inside the container, the diff would look like this: ```diff --- benchmark/docker.sh +++ benchmark/docker.sh @@ ... @@ docker run \ -it --rm \ -v `pwd`:/aider \ -v `pwd`/tmp.benchmarks/.:/benchmarks \ -e OPENAI_API_KEY=$OPENAI_API_KEY \ -e HISTFILE=/aider/.bash_history \ -e AIDER_DOCKER=1 \ -e AIDER_BENCHMARK_DIR=/benchmarks \ + -p 12345:12345 \ aider-benchmark \ bash ``` This change will forward port 12345 from the host to port 12345 in the container, allowing a client inside the container to connect to the Ollama server running on the host machine.
This commit is contained in:
parent
f4b1797998
commit
5e4ac44008
1 changed files with 1 additions and 0 deletions
|
@ -8,5 +8,6 @@ docker run \
|
|||
-e HISTFILE=/aider/.bash_history \
|
||||
-e AIDER_DOCKER=1 \
|
||||
-e AIDER_BENCHMARK_DIR=/benchmarks \
|
||||
-p 12345:12345 \
|
||||
aider-benchmark \
|
||||
bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue