Spaces:
Build error
Build error
| # Use an official Python runtime as a parent image | |
| FROM python:3.10-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| poppler-utils \ | |
| tesseract-ocr \ | |
| ffmpeg \ | |
| curl \ | |
| git \ | |
| libsentencepiece-dev \ | |
| pkg-config \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Node.js | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # Copy the requirements file into the container | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of your application's code | |
| COPY . . | |
| # Make port 7860 available to the world outside this container | |
| EXPOSE 7860 | |
| # Define environment variable for Gradio | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 | |
| # Run app.py when the container launches | |
| CMD ["python", "app.py"] |