Digital-Galatea / Dockerfile
Your Name
Install git in Docker image for Hugging Face Spaces compatibility
7320408
raw
history blame
687 Bytes
# Use Python 3.10 slim image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire application
COPY . .
# Download NLTK data during build
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('vader_lexicon')"
# Expose the port the app runs on
EXPOSE 7860
# Set environment variable for port
ENV PORT=7860
# Run the application
CMD ["python", "app.py"]