TokenTutor commited on
Commit
885fe22
·
verified ·
1 Parent(s): e32f3cb

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +25 -0
  2. requirements.txt +21 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # System deps: needed by chromadb, sentence-transformers, and pymupdf (optional)
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ build-essential \
6
+ git \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+ ENV PATH="/home/user/.local/bin:$PATH"
13
+
14
+ WORKDIR /app
15
+
16
+ COPY --chown=user requirements.txt /app/requirements.txt
17
+ RUN pip install --no-cache-dir --upgrade pip && \
18
+ pip install --no-cache-dir -r /app/requirements.txt
19
+
20
+ COPY --chown=user . /app
21
+
22
+ # Hugging Face Spaces requires listening on 7860
23
+ EXPOSE 7860
24
+
25
+ CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:7860", "app:app"]
requirements.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ flask==3.0.3
2
+ gunicorn==22.0.0
3
+
4
+ openai==1.40.6
5
+
6
+ langchain-community==0.2.16
7
+ langchain-text-splitters==0.2.2
8
+
9
+ chromadb==0.5.5
10
+ sentence-transformers==3.0.1
11
+
12
+ # Often required by sentence-transformers / transformers stack
13
+ torch==2.3.1
14
+ transformers==4.43.3
15
+ tokenizers==0.19.1
16
+ numpy==1.26.4
17
+ scipy==1.13.1
18
+
19
+ # Optional but commonly needed if you rebuild the DB in-space
20
+ pymupdf==1.24.9
21
+ tiktoken==0.7.0