se dockerizó el proyecto
This commit is contained in:
+19
@@ -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"]
|
||||
@@ -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
|
||||
@@ -0,0 +1,4 @@
|
||||
fastapi
|
||||
uvicorn[standard]
|
||||
sentence-transformers
|
||||
faiss-cpu
|
||||
Reference in New Issue
Block a user