Spaces:
Sleeping
Sleeping
File size: 1,120 Bytes
7c0a0ac 8cd9384 8c01679 8cd9384 3c07f07 8c01679 587a390 8c01679 587a390 8c01679 587a390 8c01679 587a390 8cd9384 360d6ee 7c0a0ac 360d6ee 8cd9384 360d6ee fd72914 8cd9384 fd72914 8cd9384 587a390 8cd9384 7c0a0ac 360d6ee 587a390 |
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 |
# Use a lightweight Python base image
FROM python:3.13-slim
# Install git and basic dependencies
RUN apt-get update && apt-get install -y git --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Clone your GitHub project
RUN git clone https://github.com/abubasith456/Ai-Knowledgebase.git .
# Move into the 'backend' directory
WORKDIR /app/backend
# Create directories with proper permissions
RUN mkdir -p /temp && chmod -R 777 /temp
RUN mkdir -p /.EasyOCR && chmod -R 777 /.EasyOCR
RUN mkdir -p /.cache && chmod -R 777 /.cache
RUN mkdir -p /.cache/ms-playwright && chmod -R 777 /.cache/ms-playwright
# Set environment variables for Playwright
ENV PLAYWRIGHT_BROWSERS_PATH=/.cache/ms-playwright
ENV PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
# Install Python requirements
RUN pip install -r requirements.txt
# Install Playwright dependencies and browsers as ROOT
RUN playwright install-deps
RUN playwright install chromium
# Verify installation
RUN ls -la /.cache/ms-playwright/ || echo "Playwright cache not found"
# Start your app
CMD ["python", "main.py"]
|