# Use a base image with Python and a lighter footprint FROM python:3.10-slim # Set environment variables ENV PYTHONUNBUFFERED=1 \ GRADIO_ALLOW_FLAGGING=never \ GRADIO_NUM_PORTS=1 \ GRADIO_SERVER_NAME=0.0.0.0 \ GRADIO_THEME=huggingface \ SYSTEM=spaces # Set the working directory WORKDIR /code # Copy the requirements file COPY requirements.txt /code/requirements.txt # Install dependencies RUN pip install -U pip \ && pip install -U Cython ninja \ && pip install --no-cache-dir -r /code/requirements.txt # Copy the rest of the application code COPY . /code # Set the command to run the application CMD ["python", "app.py"]