Spaces:
Runtime error
Runtime error
Commit
·
48c9d4e
1
Parent(s):
40e3f52
deepnote update
Browse files- Dockerfile +14 -4
- app.py +1 -1
Dockerfile
CHANGED
@@ -1,11 +1,21 @@
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
-
WORKDIR /
|
4 |
|
5 |
-
COPY ./requirements.txt /
|
6 |
|
7 |
-
RUN pip install --no-cache-dir --upgrade -r /
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
CMD ["chainlit", "run", "app.py", "--port", "7860", "--no-cache"]
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
WORKDIR /code
|
4 |
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
+
RUN useradd -m -u 1000 user
|
10 |
+
|
11 |
+
USER user
|
12 |
+
|
13 |
+
ENV HOME=/home/user \
|
14 |
+
PATH=/home/user/.local/bin:$PATH \
|
15 |
+
PYTHONPATH=$HOME/app \
|
16 |
+
|
17 |
+
WORKDIR $HOME/app
|
18 |
+
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
|
21 |
CMD ["chainlit", "run", "app.py", "--port", "7860", "--no-cache"]
|
app.py
CHANGED
@@ -51,7 +51,7 @@ def init_embedding_function():
|
|
51 |
return HuggingFaceEmbeddings(
|
52 |
model_name="sentence-transformers/all-mpnet-base-v2",
|
53 |
encode_kwargs={"normalize_embeddings": True},
|
54 |
-
cache_folder=EMBEDDING_MODEL_FOLDER,
|
55 |
)
|
56 |
|
57 |
|
|
|
51 |
return HuggingFaceEmbeddings(
|
52 |
model_name="sentence-transformers/all-mpnet-base-v2",
|
53 |
encode_kwargs={"normalize_embeddings": True},
|
54 |
+
#cache_folder=EMBEDDING_MODEL_FOLDER,
|
55 |
)
|
56 |
|
57 |
|