Spaces:
Running
Running
fix: cache
Browse files- Dockerfile +4 -4
- redis.conf +3 -2
Dockerfile
CHANGED
|
@@ -11,13 +11,13 @@ COPY requirements.txt .
|
|
| 11 |
RUN pip install --no-cache-dir torch==2.6.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
-
COPY redis.conf .
|
| 15 |
-
ENV REDIS_HOST=localhost
|
| 16 |
-
ENV REDIS_PORT=6379
|
| 17 |
-
|
| 18 |
COPY ./src ./src
|
| 19 |
ENV TRANSFORMERS_CACHE=/tmp/.cache/huggingface/transformers
|
| 20 |
ENV HF_HOME=/tmp/.cache/huggingface
|
| 21 |
ENV SENTENCE_TRANSFORMERS_HOME=/tmp/.cache/sentence_transformers
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
CMD ["sh", "-c", "redis-server redis.conf & python3 src/app.py"]
|
|
|
|
| 11 |
RUN pip install --no-cache-dir torch==2.6.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
COPY ./src ./src
|
| 15 |
ENV TRANSFORMERS_CACHE=/tmp/.cache/huggingface/transformers
|
| 16 |
ENV HF_HOME=/tmp/.cache/huggingface
|
| 17 |
ENV SENTENCE_TRANSFORMERS_HOME=/tmp/.cache/sentence_transformers
|
| 18 |
|
| 19 |
+
COPY redis.conf .
|
| 20 |
+
ENV REDIS_HOST=localhost
|
| 21 |
+
ENV REDIS_PORT=6379
|
| 22 |
+
|
| 23 |
CMD ["sh", "-c", "redis-server redis.conf & python3 src/app.py"]
|
redis.conf
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
|
|
| 1 |
loadmodule /opt/redis-stack/lib/redisearch.so
|
| 2 |
-
|
| 3 |
maxmemory 12gb
|
| 4 |
-
|
| 5 |
dir /tmp
|
|
|
|
| 1 |
+
# vector search functionality
|
| 2 |
loadmodule /opt/redis-stack/lib/redisearch.so
|
| 3 |
+
# free tier offers 16gb
|
| 4 |
maxmemory 12gb
|
| 5 |
+
# use /tmp to avoid permission errors
|
| 6 |
dir /tmp
|