Spaces:
Build error
Build error
File size: 1,025 Bytes
5740294 9604e32 e26a885 5740294 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# 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"] |