yuvrajsingh6 commited on
Commit
632ced5
·
1 Parent(s): 4d592a4

feat: Move Dockerfile to root for HF Spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ tesseract-ocr \
8
+ poppler-utils \
9
+ nodejs \
10
+ npm \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ COPY backend/requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ COPY backend/ ./backend/
17
+ COPY frontend/ ./frontend/
18
+
19
+ RUN cd frontend && npm install && npm run build
20
+
21
+ RUN mkdir -p /app/storage/uploads /app/storage/vector_db
22
+
23
+ EXPOSE 7860
24
+
25
+ CMD ["bash", "-c", "cd backend && uvicorn app.main:app --host 0.0.0.0 --port 7860 & cd frontend && npx serve -s dist -l 7861"]