Spaces:
Paused
Paused
Dobin Yim
commited on
Commit
·
7d616ed
1
Parent(s):
672a129
updated Docker and requirements
Browse files- Dockerfile +18 -5
- requirements.txt +0 -9
Dockerfile
CHANGED
@@ -1,11 +1,24 @@
|
|
1 |
FROM python:3.11
|
|
|
|
|
2 |
RUN useradd -m -u 1000 user
|
|
|
|
|
3 |
USER user
|
|
|
|
|
4 |
ENV HOME=/home/user \
|
5 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
6 |
WORKDIR $HOME/app
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.11
|
2 |
+
|
3 |
+
# Create a non-root user
|
4 |
RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
# Switch to the new user
|
7 |
USER user
|
8 |
+
|
9 |
+
# Set environment variables
|
10 |
ENV HOME=/home/user \
|
11 |
PATH=/home/user/.local/bin:$PATH
|
12 |
+
|
13 |
+
# Set the working directory
|
14 |
WORKDIR $HOME/app
|
15 |
+
|
16 |
+
# Copy requirements file and install dependencies
|
17 |
+
COPY --chown=user requirements.txt requirements.txt
|
18 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
19 |
+
|
20 |
+
# Copy the rest of the application code
|
21 |
+
COPY --chown=user . .
|
22 |
+
|
23 |
+
# Command to run the application
|
24 |
+
CMD ["chainlit", "run", "final.py", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -6,19 +6,10 @@ langchain-community
|
|
6 |
langchain_huggingface
|
7 |
langchain_openai
|
8 |
langchain-text-splitters
|
9 |
-
peft
|
10 |
-
bitsandbytes
|
11 |
-
accelerate
|
12 |
-
qdrant-client
|
13 |
python-dotenv
|
14 |
pymupdf
|
15 |
-
huggingface_hub
|
16 |
pandas
|
17 |
-
sentence-transformers
|
18 |
python-docx
|
19 |
docx2pdf
|
20 |
-
python-dotenv
|
21 |
-
transformers
|
22 |
-
torch
|
23 |
|
24 |
|
|
|
6 |
langchain_huggingface
|
7 |
langchain_openai
|
8 |
langchain-text-splitters
|
|
|
|
|
|
|
|
|
9 |
python-dotenv
|
10 |
pymupdf
|
|
|
11 |
pandas
|
|
|
12 |
python-docx
|
13 |
docx2pdf
|
|
|
|
|
|
|
14 |
|
15 |
|