diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bac8c0b --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/inicializar_proyecto.txt b/inicializar_proyecto.txt index 152f8d7..b9dd968 100644 --- a/inicializar_proyecto.txt +++ b/inicializar_proyecto.txt @@ -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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..01a0c08 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +fastapi +uvicorn[standard] +sentence-transformers +faiss-cpu \ No newline at end of file