POMS-QA-GraphRAG / Dockerfile
npc0's picture
Update Dockerfile
1aa5db5 verified
raw
history blame
1.04 kB
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.11
RUN pip install --no-cache-dir --upgrade pip
RUN mkdir /dep
WORKDIR /dep
RUN git clone https://github.com/jaigouk/claude-proxy-api.git
WORKDIR /dep/claude-proxy-api
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
RUN pip install -r requirements.txt
COPY --chown=user proxy.env ./.env
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN mkdir -p ./ragtest/input
# RUN curl https://secure.ssa.gov/apps10/poms.nsf/lnx/0500502100 > ./ragtest/input/book.txt
RUN curl https://huggingface.co/spaces/npc0/POM-QA/resolve/main/knowledge_extraction.csv > ./ragtest/input/book.txt
RUN python -m graphrag.index --init --root ./ragtest
COPY --chown=user ./app.py /app
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
COPY --chown=user ./run.sh run.sh
RUN chmod +x run.sh
ENTRYPOINT ["/app/run.sh"]