SamiKLN commited on
Commit
4cafbd1
·
verified ·
1 Parent(s): e9e4cb0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ poppler-utils \
8
+ libmagic1 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first to leverage Docker cache
12
+ COPY backend/requirements.txt .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of the application
18
+ COPY . .
19
+
20
+ # Set environment variables
21
+ ENV PYTHONPATH=/app
22
+ ENV UPLOAD_FOLDER=/app/uploads
23
+ ENV HF_TOKEN=your_huggingface_token_here
24
+
25
+ # Create upload directory
26
+ RUN mkdir -p ${UPLOAD_FOLDER}
27
+
28
+ # Expose the port the app runs on
29
+ EXPOSE 8000
30
+
31
+ # Command to run the application
32
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]