Spaces:
Sleeping
Sleeping
File size: 1,301 Bytes
ca892d5 b812ab1 2476b30 ca892d5 b812ab1 2476b30 ca892d5 2476b30 b812ab1 2476b30 ca892d5 2476b30 b812ab1 2476b30 b812ab1 884f048 ca892d5 | 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 43 44 45 46 47 48 49 50 | FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies including Playwright requirements
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
cmake \
rsync \
libgl1 \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Install Node.js (required for some dependencies)
RUN apt-get update && \
apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/* && apt-get clean
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install Gradio 6 with OAuth and MCP support
RUN pip install --no-cache-dir \
gradio[oauth,mcp]==6.2.0 \
"uvicorn>=0.14.0" \
spaces
# Install Playwright and browsers AFTER installing the Python package
RUN pip install playwright && \
playwright install --with-deps chromium && \
echo "✅ Playwright browsers installed successfully"
# Create necessary directories
RUN mkdir -p /home/user && ( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true
# Copy application files
COPY . .
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"] |