Spaces:
Sleeping
Sleeping
Synced repo using 'sync_with_huggingface' Github Action
Browse files- Dockerfile +5 -2
- var.py +1 -1
Dockerfile
CHANGED
@@ -7,9 +7,12 @@ FROM python:3.11-slim
|
|
7 |
# Set the working directory in the container
|
8 |
WORKDIR /app
|
9 |
|
10 |
-
ENV HF_HOME=/
|
|
|
|
|
|
|
11 |
|
12 |
-
RUN mkdir -p /
|
13 |
|
14 |
# Copy requirements.txt and install dependencies
|
15 |
COPY requirements.txt .
|
|
|
7 |
# Set the working directory in the container
|
8 |
WORKDIR /app
|
9 |
|
10 |
+
ENV HF_HOME=/data/hf_cache
|
11 |
+
ENV TRANSFORMERS_CACHE=/data/hf_cache/transformers
|
12 |
+
ENV HF_DATASETS_CACHE=/data/hf_cache/datasets
|
13 |
+
ENV HF_HUB_CACHE=/data/hf_cache/hub
|
14 |
|
15 |
+
RUN mkdir -p /data/hf_cache/transformers /data/hf_cache/datasets /data/hf_cache/hub && chmod -R 777 /data/hf_cache
|
16 |
|
17 |
# Copy requirements.txt and install dependencies
|
18 |
COPY requirements.txt .
|
var.py
CHANGED
@@ -51,7 +51,7 @@ class SchemaVectorDB:
|
|
51 |
class FullVectorDB:
|
52 |
def __init__(self):
|
53 |
self.client = chromadb.PersistentClient(path="db/chroma")
|
54 |
-
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2", cache_folder="
|
55 |
|
56 |
# Get existing collections or create if not exist
|
57 |
self.restaurants_col = self.client.get_or_create_collection("restaurants")
|
|
|
51 |
class FullVectorDB:
|
52 |
def __init__(self):
|
53 |
self.client = chromadb.PersistentClient(path="db/chroma")
|
54 |
+
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2", cache_folder="/data/hf_cache/transformers")
|
55 |
|
56 |
# Get existing collections or create if not exist
|
57 |
self.restaurants_col = self.client.get_or_create_collection("restaurants")
|