getzep / zep

Zep: Long-Term Memory for ‍AI Assistants.

Home Page:https://docs.getzep.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker compose up fails when changing ZEP_SERVER_PORT

j-jalving opened this issue · comments

Describe the bug
When changing the ZEP_SERVER_PORT in the .env the docker container cannot start anymore.

To Reproduce
On a fresh install set ZEP_SERVER_PORT=3000 (for example)

Expected behavior
I would expect the server to start on port 3000.

Logs

zep-postgres  | 
zep-postgres  | PostgreSQL Database directory appears to contain a database; Skipping initialization
zep-postgres  | 
zep-postgres  | 2023-11-05 16:16:59.769 UTC [1] LOG:  starting PostgreSQL 15.4 (Debian 15.4-2.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
zep-postgres  | 2023-11-05 16:16:59.770 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
zep-postgres  | 2023-11-05 16:16:59.770 UTC [1] LOG:  listening on IPv6 address "::", port 5432
zep-postgres  | 2023-11-05 16:16:59.771 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
zep-postgres  | 2023-11-05 16:16:59.774 UTC [27] LOG:  database system was shut down at 2023-11-05 16:16:57 UTC
zep-postgres  | 2023-11-05 16:16:59.777 UTC [1] LOG:  database system is ready to accept connections
zep-nlp       | 2023-11-05 16:17:09,171 - uvicorn.error - INFO - Started server process [1]
zep-nlp       | 2023-11-05 16:17:09,171 - uvicorn.error - INFO - Waiting for application startup.
zep-nlp       | 2023-11-05 16:17:09,171 - zep-nlp - INFO - Downloading model all-MiniLM-L6-v2 if not present. This may take a while.
zep-nlp       | 
Downloading (…)e9125/.gitattributes:   0%|          | 0.00/1.18k [00:00<?, ?B/s]
Downloading (…)e9125/.gitattributes: 100%|██████████| 1.18k/1.18k [00:00<00:00, 3.16MB/s]
zep-nlp       | 
Downloading (…)_Pooling/config.json:   0%|          | 0.00/190 [00:00<?, ?B/s]
Downloading (…)_Pooling/config.json: 100%|██████████| 190/190 [00:00<00:00, 691kB/s]
zep-nlp       | 
Downloading (…)7e55de9125/README.md:   0%|          | 0.00/10.6k [00:00<?, ?B/s]
Downloading (…)7e55de9125/README.md: 100%|██████████| 10.6k/10.6k [00:00<00:00, 30.8MB/s]
zep-nlp       | 
Downloading (…)55de9125/config.json:   0%|          | 0.00/612 [00:00<?, ?B/s]
Downloading (…)55de9125/config.json: 100%|██████████| 612/612 [00:00<00:00, 3.09MB/s]
zep-nlp       | 
Downloading (…)ce_transformers.json:   0%|          | 0.00/116 [00:00<?, ?B/s]
Downloading (…)ce_transformers.json: 100%|██████████| 116/116 [00:00<00:00, 698kB/s]
zep-nlp       | 
Downloading (…)125/data_config.json:   0%|          | 0.00/39.3k [00:00<?, ?B/s]
Downloading (…)125/data_config.json: 100%|██████████| 39.3k/39.3k [00:00<00:00, 440kB/s]
zep-nlp       | 
Downloading pytorch_model.bin:   0%|          | 0.00/90.9M [00:00<?, ?B/s]
Downloading pytorch_model.bin:  23%|██▎       | 21.0M/90.9M [00:00<00:00, 208MB/s]
Downloading pytorch_model.bin:  69%|██████▉   | 62.9M/90.9M [00:00<00:00, 321MB/s]
Downloading pytorch_model.bin: 100%|██████████| 90.9M/90.9M [00:00<00:00, 323MB/s]
zep-nlp       | 
Downloading (…)nce_bert_config.json:   0%|          | 0.00/53.0 [00:00<?, ?B/s]
Downloading (…)nce_bert_config.json: 100%|██████████| 53.0/53.0 [00:00<00:00, 209kB/s]
zep-nlp       | 
Downloading (…)cial_tokens_map.json:   0%|          | 0.00/112 [00:00<?, ?B/s]
Downloading (…)cial_tokens_map.json: 100%|██████████| 112/112 [00:00<00:00, 469kB/s]
zep-nlp       | 
Downloading (…)e9125/tokenizer.json:   0%|          | 0.00/466k [00:00<?, ?B/s]
Downloading (…)e9125/tokenizer.json: 100%|██████████| 466k/466k [00:00<00:00, 1.70MB/s]
Downloading (…)e9125/tokenizer.json: 100%|██████████| 466k/466k [00:00<00:00, 1.69MB/s]
zep-nlp       | 
Downloading (…)okenizer_config.json:   0%|          | 0.00/350 [00:00<?, ?B/s]
Downloading (…)okenizer_config.json: 100%|██████████| 350/350 [00:00<00:00, 1.30MB/s]
zep-nlp       | 
Downloading (…)9125/train_script.py:   0%|          | 0.00/13.2k [00:00<?, ?B/s]
Downloading (…)9125/train_script.py: 100%|██████████| 13.2k/13.2k [00:00<00:00, 39.2MB/s]
zep-nlp       | 
Downloading (…)7e55de9125/vocab.txt:   0%|          | 0.00/232k [00:00<?, ?B/s]
Downloading (…)7e55de9125/vocab.txt: 100%|██████████| 232k/232k [00:00<00:00, 1.28MB/s]
Downloading (…)7e55de9125/vocab.txt: 100%|██████████| 232k/232k [00:00<00:00, 1.28MB/s]
zep-nlp       | 
Downloading (…)5de9125/modules.json:   0%|          | 0.00/349 [00:00<?, ?B/s]
Downloading (…)5de9125/modules.json: 100%|██████████| 349/349 [00:00<00:00, 1.65MB/s]
zep-nlp       | 2023-11-05 16:17:13,838 - zep-nlp - INFO - Loaded model all-MiniLM-L6-v2 on device cpu.
zep-nlp       | 2023-11-05 16:17:13,838 - zep-nlp - INFO - Loading spacy model en_core_web_sm. If the model is not already downloaded, this may take a while.
zep-nlp       | 2023-11-05 16:17:14,433 - zep-nlp - INFO - Loaded spacy model en_core_web_sm.
zep-nlp       | 2023-11-05 16:17:14,434 - uvicorn.error - INFO - Application startup complete.
zep-nlp       | 2023-11-05 16:17:14,434 - uvicorn.error - INFO - Uvicorn running on http://0.0.0.0:3001 (Press CTRL+C to quit)

Environment (please complete the following information):

  • Zep version: v0.17.3
  • Zep SDK and version: ?
  • Deployment: Using docker compose with a Ploi Ubuntu server

Additional context
The log doesn't show errors, but the server is not reachable and there is nothing running on either port 3000 or 8000. It seems that port 8000 is hardcoded in a lot of places.

You need to modify the docker-compose file to expose the new port number. This config is external to Zep and deployment-specific.

- "8000:8000"

and the health check here:

test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/8000' || exit 1

You needn't change ZEP_SERVER_PORT if you're using docker compose. You can just change the external port number in the first code block above to 3000:

3000:8000

The above maps external port 3000 to container port 8000. No other changes (i.e. the healthcheck port) are necessary.