-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 983 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 983 Bytes
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
# Use a base Python image
FROM python:3.12-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the project files into the container
COPY . /app
# Aggiorna i pacchetti e installa git
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Install dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements_docker.txt
# Install spaCy English model
RUN python -m spacy download en_core_web_sm
# Verify installations
RUN python -c "import spacy; nlp = spacy.load('en_core_web_sm'); print('✅ spaCy model ready')" && \
python -c "import fastembed; print('✅ FastEmbed ready')" && \
python -c "from qdrant_client import QdrantClient; print('✅ Qdrant client ready')"
# Expose port
EXPOSE 7687
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD python -c "import spacy; spacy.load('en_core_web_sm')" || exit 1
# Run application
CMD ["python", "src/main.py"]