mobenta commited on
Commit
d437304
·
verified ·
1 Parent(s): 49c4d8f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.10-slim
3
+
4
+ # Install LibreOffice and other dependencies for docx to pdf conversion
5
+ # LibreOffice is a common dependency for robust file conversion on Linux
6
+ RUN apt-get update && \
7
+ apt-get install -y libreoffice pandoc && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install Python dependencies from requirements.txt
11
+ COPY requirements.txt /app/
12
+ WORKDIR /app
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy the application code
16
+ COPY app.py /app/
17
+
18
+ # Set the entry point for Gradio
19
+ ENV GRADIO_SERVER_PORT 7860
20
+ EXPOSE 7860
21
+ CMD ["python3", "app.py"]