Eloquence-Backend / Dockerfile
PMS61
fixes
2e62928
raw
history blame
986 Bytes
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /code
# Install system dependencies required by your project (ffmpeg, opencv)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ffmpeg \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# Copy the dependencies file to the working directory
COPY ./requirements.txt /code/requirements.txt
# Install any needed packages specified in requirements.txt
# We add gunicorn here for a production-ready web server
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt gunicorn
# Copy the rest of the application's code to the working directory
COPY . /code/
# Expose the port the app runs on (Hugging Face Spaces default is 7860)
EXPOSE 7860
# Command to run the application using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]