Spaces:
Build error
Build error
File size: 1,060 Bytes
be6dbc5 6c20deb 0b4448c d3c3946 e11282b be6dbc5 5a0a3c7 d3c3946 be6dbc5 d3c3946 8c133e2 4c28492 8c133e2 4c28492 d3c3946 be6dbc5 d3c3946 8459efa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
FROM python:3.9-slim-bullseye as pdfgpt-chat-img
RUN mkdir -p /.jina
RUN chmod 777 /.jina
RUN mkdir -p /.cache
RUN chmod 777 /.cache
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Expose the secret OPENAI_API_KEY at buildtime and use its value as git remote URL
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
git init && \
git remote add origin $(cat /run/secrets/OPENAI_API_KEY)
COPY requirements_pytorch.txt requirements_pytorch.txt
COPY requirements_api.txt requirements_api.txt
COPY requirements_app.txt requirements_app.txt
RUN pip3 install -r requirements_pytorch.txt
RUN pip3 install -r requirements_api.txt
RUN pip3 install -r requirements_app.txt
WORKDIR /app
COPY intfloat /app/intfloat
COPY app.py app.py
COPY api.py api.py
EXPOSE 7860
EXPOSE 8080
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
CMD ["/bin/bash", "-c", "lc-serve deploy local api.py;streamlit run app.py --server.port=7860"] |