23 lines
636 B
Docker
23 lines
636 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install uv for fast, reproducible installs
|
|
RUN pip install --no-cache-dir uv
|
|
|
|
# Install Python dependencies from pyproject.toml
|
|
COPY pyproject.toml .
|
|
RUN uv pip install --system --no-cache .
|
|
|
|
# Download spaCy language models
|
|
RUN python -m spacy download en_core_web_sm && \
|
|
python -m spacy download fr_core_news_sm && \
|
|
python -m spacy download es_core_news_sm && \
|
|
python -m spacy download it_core_news_sm && \
|
|
python -m spacy download de_core_news_sm
|
|
|
|
# Copy application source
|
|
COPY app/ ./app/
|
|
|
|
EXPOSE 8000
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|