Skip to content

Commit

Permalink
fix: limit elastic search memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Sep 11, 2024
1 parent a7d8430 commit 40d138d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# sudo docker build --network=host -t memoryscope .

# To run docker image:
# sudo docker run -it --rm --net=host memoryscope
# sudo docker run -it --rm --memory=4G --net=host memoryscope
# To run docker image with arguments (refer to memoryscope/core/config/arguments.py):
# sudo docker run -it --rm --net=host -e "OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "language=en" -e "human_name=superman" -e "generation_backend=openai_generation" -e "generation_model=gpt-4o" -e "embedding_backend=openai_embedding" -e "embedding_model=text-embedding-3-small" -e "enable_ranker=False" memoryscope
# sudo docker run -it --rm --memory=4G --net=host -e "OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -e "language=en" -e "human_name=superman" -e "generation_backend=openai_generation" -e "generation_model=gpt-4o" -e "embedding_backend=openai_embedding" -e "embedding_model=text-embedding-3-small" -e "enable_ranker=False" memoryscope

FROM python:3.11

Expand Down
15 changes: 4 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ services:
# OPENAI_API_KEY: "sk-0000000000"
volumes:
- ./memoryscope/core/config:/memory_scope_project/memoryscope/memoryscope/core/config
depends_on:
- elasticsearch

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.2
ports:
- "9200:9200"
environment:
discovery.type: "single-node"
xpack.security.enabled: "false"
xpack.license.self_generated.type: "trial"
deploy:
resources:
limits:
memory: 4G
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
OPENAI_API_KEY: "sk-0000000000"
```

3. Run `docker-compose up` to build and launch the memory-scope cli interface.
3. Run `docker-compose run memory_scope_main` to build and launch the memory-scope cli interface.


## III. Install from PyPI
Expand Down
2 changes: 1 addition & 1 deletion docs/installation_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
DASHSCOPE_API_KEY: "sk-0000000000"
```

3. 运行 `docker-compose up` 命令来构建并启动 MemoryScope CLI 界面。
3. 运行 `docker-compose run memory_scope_main` 命令来构建并启动 MemoryScope CLI 界面。


## 三、通过 PYPI 安装
Expand Down

0 comments on commit 40d138d

Please sign in to comment.