milanchndr's picture
Update Dockerfile
f8dffab verified
raw
history blame contribute delete
589 Bytes
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install build dependencies for blis
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Create writable directory
RUN mkdir -p /app/app_model && chmod -R 777 /app/app_model
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port (Hugging Face Spaces uses 7860 by default)
EXPOSE 7860
# Command to run the Flask app
CMD ["python", "main.py"]