perplexity-clone / Dockerfile
Naveen-2007's picture
Deploy to Hugging Face Spaces - Remove Render, enable full features
4351cdd
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create directories for data persistence
RUN mkdir -p /app/workspace_data /app/chroma_db
# Hugging Face Spaces uses port 7860
EXPOSE 7860
# Copy startup script
COPY startup.sh /app/startup.sh
RUN chmod +x /app/startup.sh
# Run both services
CMD ["/bin/bash", "/app/startup.sh"]