Skip to content

Commit c48ebef

Browse files
committed
update latest docker image to pre-download model
1 parent 1a8c206 commit c48ebef

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ RUN pip install --upgrade pip \
5151
RUN mkdir -p /app/models
5252

5353
# Pre-download models
54-
# RUN python -c "from sentence_transformers import SentenceTransformer; \
55-
# model = SentenceTransformer('all-MiniLM-L6-v2'); \
56-
# model.save('/app/models/all-MiniLM-L6-v2')"
54+
RUN python -c "from sentence_transformers import SentenceTransformer; \
55+
model = SentenceTransformer('all-MiniLM-L6-v2'); \
56+
model.save('/app/models/all-MiniLM-L6-v2')"
5757

5858
# Set environment variables
5959
ENV SENTENCE_TRANSFORMERS_HOME=/app/models

Diff for: README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
[![Docker Hub](https://img.shields.io/docker/v/buryhuang/mcp-server-any-openapi?label=Docker%20Hub)](https://hub.docker.com/r/buryhuang/mcp-server-any-openapi)
33
[![smithery badge](https://smithery.ai/badge/@baryhuang/mcp-server-any-openapi)](https://smithery.ai/server/@baryhuang/mcp-server-any-openapi)
44

5+
## TODO
6+
- The docker image is 2GB without pre-downloaded models. Its 3.76GB with pre-downloaded models!! Too big, someone please help me to reduce the size.
7+
58
## TL'DR
69
**Why I create this**: I want to serve my private API, whose swagger openapi docs is a few hundreds KB in size.
710
- Claude MCP simply error on processing these size of file
@@ -34,7 +37,8 @@ MCP Client -> Construct OpenAPI Request -> Execute Request -> Return Response
3437

3538
## Limitations
3639
- 🐢 Cold start penalty (~15s for model loading) if not using docker image
37-
- Current docker image disabled downloading models. You have a dependency over huggingface. When you load the Claude Desktop, it takes some time to download the model. If huggingface is down, your server will not start.
40+
- [Obsolete] Current docker image disabled downloading models. You have a dependency over huggingface. When you load the Claude Desktop, it takes some time to download the model. If huggingface is down, your server will not start.
41+
- The latest docker image is embedding pre-downloaded models. If there is issues, I would revert to the old one.
3842

3943

4044
## Multi-instance config example

0 commit comments

Comments
 (0)