Spaces:
Runtime error
Runtime error
FROM python:3.9-slim | |
WORKDIR /app | |
# Install build essentials and wget | |
RUN apt-get update && \ | |
apt-get install -y build-essential wget git && \ | |
rm -rf /var/lib/apt/lists/* | |
# Clone and install fastText v0.9.2 (stable release) | |
RUN git clone --branch v0.9.2 https://github.com/facebookresearch/fastText.git && \ | |
cd fastText && \ | |
pip install . | |
# Download the language identification model (v1.0) | |
# Model details: https://fasttext.cc/docs/en/language-identification.html | |
RUN wget https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin | |
# Copy requirements and install dependencies | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
# Copy application code | |
COPY app.py . | |
# Expose port | |
EXPOSE 8000 | |
# Run the application | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |