Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +16 -4
Dockerfile
CHANGED
@@ -1,10 +1,22 @@
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
WORKDIR /code/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
9 |
EXPOSE 7860
|
10 |
|
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
+
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
# Switch to the "user" user
|
7 |
+
USER user
|
8 |
+
|
9 |
+
# Set the working directory to the user's home directory
|
10 |
+
|
11 |
WORKDIR /code/
|
12 |
+
RUN chmod -R 777 /code/
|
13 |
+
|
14 |
+
RUN pip install --no-cache-dir faiss-cpu langchain-community gradio sentence-transformers
|
15 |
+
|
16 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
17 |
+
COPY --chown=user ./app.py /code/app.py
|
18 |
+
COPY --chown=user ./vectorestore/ /code/vectorstore
|
19 |
+
|
20 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
21 |
EXPOSE 7860
|
22 |
|