Skip to content

Commit 366e058

Browse files
download sentence-transformers outside of app directory
1 parent 4afe49a commit 366e058

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

app/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ COPY requirements.txt /app/
3434
RUN pip install --no-cache-dir -r requirements.txt
3535

3636
# Set the environment variable for the sentence transformers model
37-
ENV SENTENCE_TRANSFORMERS_HOME="/app/sentence-transformers"
37+
ENV SENTENCE_TRANSFORMERS_HOME="/root/.cache/sentence_transformers"
3838

3939
# Preload the sentence transformer model to cache
4040
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"

compose.dev.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ services:
1616
SEGMENT_WRITE_KEY: ${SEGMENT_WRITE_KEY} # Set your Segment write key here or in the .env file
1717
SESSION_COOKIE_SECURE: 0
1818
OPENAI_BASE_URL: "http://llm:5051/api/v1"
19-
SENTENCE_TRANSFORMERS_HOME: /app/sentence-transformers
2019
volumes:
2120
- type: bind
2221
source: ./app

compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ services:
2626
INTERCOM_TOKEN:
2727
INTERCOM_ADMIN_ID:
2828
REDIS_URL: redis://redis:6379/0
29-
SENTENCE_TRANSFORMERS_HOME: /app/sentence-transformers
3029
deploy:
3130
resources:
3231
reservations:

0 commit comments

Comments
 (0)