Download Dockerfile from Zamax14/api_rag: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/spaces/Zamax14/api_rag/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Zamax14/api_rag/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Zamax14/api_rag/resolve/main/Dockerfile
1.39 kB
| # ============================================================================== | |
| # Project Name: RAG LLM | |
| # Script Name: Dockerfile | |
| # Authors: Abraham Sánchez, Ulises Moya, Alejandro Zarate | |
| # Description: | |
| # This Python application provides an API service that retrieves answers to | |
| # user queries based on the given context. | |
| # | |
| # License: MIT | |
| # ============================================================================== | |
| FROM python:3.12.8-slim | |
| LABEL "author"="IIEG - Instituto de Información Estadística y Geografíca de Jalisco" | |
| RUN apt update && \ | |
| apt install --no-install-recommends -y \ | |
| curl \ | |
| libmagic-dev \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| && apt clean \ | |
| && apt autoremove \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /api | |
| ENV PYTHONDONTWRITEBYTECODE 1 | |
| ENV PYTHONUNBUFFERED 1 | |
| ENV VIRTUAL_ENV=/opt/venv | |
| RUN python3 -m venv $VIRTUAL_ENV | |
| ENV PATH="$VIRTUAL_ENV/bin:$PATH" | |
| RUN pip install -U -q --no-cache-dir pip wheel | |
| RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| COPY rag/requirements.txt . | |
| RUN pip install -r requirements.txt | |
| ADD rag/app/ /api/app/ | |
| ADD rag/models/ /api/models/ | |
| ADD rag/taggers/ /api/taggers/ | |
| ADD rag/tokenizers/ /api/tokenizers/ | |
| RUN mkdir -p /api/rag/models/hub | |
| RUN chmod -R 777 /api | |
| EXPOSE 7860 | |
| CMD ["hypercorn", "app.main:app", "--bind", "0.0.0.0:7860", "--access-logfile", "-"] | |