Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
+
# you will also find guides on how best to write your Dockerfile
|
| 3 |
+
|
| 4 |
+
FROM python:3.9
|
| 5 |
+
|
| 6 |
+
RUN useradd -m -u 1000 user
|
| 7 |
+
USER user
|
| 8 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 9 |
+
|
| 10 |
+
RUN pip install -U pip
|
| 11 |
+
RUN mkdir /dep
|
| 12 |
+
WORKDIR /dep
|
| 13 |
+
RUN git clone https://github.com/yourusername/claude-proxy-api.git
|
| 14 |
+
WORKDIR /dep/claude-proxy-api
|
| 15 |
+
RUN pip install -r requirements.txt
|
| 16 |
+
COPY --chown=user proxy.env ./.env
|
| 17 |
+
|
| 18 |
+
WORKDIR /app
|
| 19 |
+
|
| 20 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 21 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 22 |
+
|
| 23 |
+
RUN mkdir -p ./ragtest/input
|
| 24 |
+
# RUN curl https://secure.ssa.gov/apps10/poms.nsf/lnx/0500502100 > ./ragtest/input/book.txt
|
| 25 |
+
RUN curl https://huggingface.co/spaces/npc0/POM-QA/resolve/main/knowledge_extraction.csv > ./ragtest/input/book.txt
|
| 26 |
+
RUN python -m graphrag.index --init --root ./ragtest
|
| 27 |
+
COPY --chown=user ./app.py /app
|
| 28 |
+
EXPOSE 7860
|
| 29 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 30 |
+
CMD ["uvicorn", "server_openai:app", "--host", "localhost", "--port", "8000", "&&", "infinity_emb", "v2", "--model-id", "mixedbread-ai/mxbai-embed-large-v1", "--port", "7997", "&&", "python", "app.py"]
|