Moshe Ofer
Initial commit for Hugging Face Space
b582a51
raw
history blame
697 Bytes
# Use a lightweight Python base image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies required for the application
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git && \
rm -rf /var/lib/apt/lists/*
# Copy the application files into the container
COPY . /app
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Expose the application port
EXPOSE 7860
# Command to run the application using Gunicorn with Eventlet
CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "app:app", "-b", "0.0.0.0:7860"]