Spaces:
Runtime error
Runtime error
camphong24032002
commited on
Commit
•
3ffcc3c
1
Parent(s):
18d6795
Test
Browse files- Dockerfile +14 -4
Dockerfile
CHANGED
@@ -1,16 +1,26 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
RUN
|
4 |
-
|
|
|
5 |
|
6 |
WORKDIR /code
|
7 |
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
-
RUN
|
11 |
|
12 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
13 |
|
14 |
-
COPY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN apt-get update && apt-get install -y \
|
4 |
+
libgl1-mesa-glx \
|
5 |
+
&& rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
WORKDIR /code
|
8 |
|
9 |
COPY ./requirements.txt /code/requirements.txt
|
10 |
|
11 |
+
RUN pip install --upgrade pip
|
12 |
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
|
15 |
+
COPY . .
|
16 |
+
|
17 |
+
RUN chown -R 1000:1000 /code
|
18 |
+
RUN chmod -R 777 /usr/local/lib/python3.10/site-packages/llama_index/core/_static/nltk_cache/corpora
|
19 |
+
|
20 |
+
USER 1000
|
21 |
+
|
22 |
+
ENV NKTL_DATA=/usr/local/nltk_data
|
23 |
+
|
24 |
+
RUN python -c "import nltk; nltk.download('stopwords')"
|
25 |
|
26 |
CMD ["python", "app.py"]
|