Spaces:
Runtime error
Runtime error
File size: 816 Bytes
9d8fbac | 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 | FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc \
libasound2-dev \
espeak \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Download spaCy model
RUN python -m spacy download en_core_web_sm
# Copy application code
COPY . .
# Create upload directory
RUN mkdir -p uploads
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=5000
ENV HF_MODEL="mistralai/Mistral-7B-Instruct-v0.2"
# Expose the port the app runs on
EXPOSE 5000
# Command to run the application
CMD ["python", "app.py"] |