Spaces:
Runtime error
Runtime error
File size: 696 Bytes
20a1340 |
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 |
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Install apt dependencies for Chromium
RUN apt-get update && apt-get install -y \
chromium-browser \
chromium-chromedriver \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables so Selenium can find Chromium
ENV CHROME_BIN=/usr/bin/chromium-browser
ENV CHROMEDRIVER_PATH=/usr/bin/chromedriver
# Copy the requirements file and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the rest of the application code
COPY app.py .
# Expose port 7860 (the default for Gradio)
EXPOSE 7860
# Run the application
CMD ["python", "app.py"] |