LLM-LOD / Dockerfile
wjbmattingly's picture
Upload Dockerfile
1b4b5a0 verified
raw
history blame
731 Bytes
FROM python:3.10
WORKDIR /app
# Install system dependencies for building Python packages
RUN apt-get update && apt-get install -y \
gcc \
g++ \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip and install wheel to use pre-compiled packages when possible
RUN pip install --upgrade pip wheel
# Copy requirements and install dependencies
COPY requirements.txt .
# Install packages with timeout and prefer binary wheels
RUN pip install --no-cache-dir --timeout 300 --prefer-binary -r requirements.txt
# Download spaCy model
RUN python -m spacy download en_core_web_sm
# Copy application files
COPY . .
# Expose port for HuggingFace Spaces
EXPOSE 7860
# Run the Flask app
CMD ["python", "app.py"]