kacapower commited on
Commit
fbc4253
·
verified ·
1 Parent(s): 2cdeda0

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Debian-based Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Install the four core conversion engines
5
+ RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ libreoffice \
8
+ imagemagick \
9
+ pandoc \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set the working directory
13
+ WORKDIR /app
14
+
15
+ # Copy and install Python dependencies
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy the API code
20
+ COPY . .
21
+
22
+ # Expose the mandatory port for Hugging Face Spaces
23
+ EXPOSE 7860
24
+
25
+ # Start the FastAPI server
26
+ CMD ["python", "main.py"]