se dockerizó el proyecto

This commit is contained in:
evenegas
2025-06-05 09:27:23 -06:00
parent 7c3578af7d
commit 9466fa3c24
3 changed files with 38 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# Imagen base ligera con Python 3.11
FROM python:3.11-slim
# Establecer el directorio de trabajo
WORKDIR /app
# Copiar archivos necesarios
COPY requirements.txt .
COPY qa_fenix.jsonl .
COPY chat_semantic_fenix_score.py .
# Instalar dependencias
RUN pip install --no-cache-dir -r requirements.txt
# Exponer el puerto de FastAPI
EXPOSE 8000
# Comando para iniciar el servidor
CMD ["uvicorn", "chat_semantic_fenix_score:app", "--host", "0.0.0.0", "--port", "8000"]
+15
View File
@@ -6,3 +6,18 @@
//curl -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_input": "¿Cuál es el horario de atención?", "threshold": 0.65}'
curl -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_input": "Qué servicios tienenen el cedetec", "threshold": 0.65}'
curl -X POST http://127.0.0.1:8000/chat \
-H "Content-Type: application/json" \
-d '{"user_input": "dime los servicios tienenen el cedetec", "threshold": 0.65}'
//docker
dockebuild -t bot-api .
//inicializar servidor en docker
docker run -p 8000:8000 bot-api
+4
View File
@@ -0,0 +1,4 @@
fastapi
uvicorn[standard]
sentence-transformers
faiss-cpu