backend-filehandler / Dockerfile
kacapower's picture
Create Dockerfile
fbc4253 verified
raw
history blame contribute delete
557 Bytes
# Use a lightweight Debian-based Python image
FROM python:3.10-slim
# Install the four core conversion engines
RUN apt-get update && apt-get install -y \
ffmpeg \
libreoffice \
imagemagick \
pandoc \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the API code
COPY . .
# Expose the mandatory port for Hugging Face Spaces
EXPOSE 7860
# Start the FastAPI server
CMD ["python", "main.py"]