File size: 657 Bytes
a7566b2
 
 
 
918d142
a7566b2
 
918d142
 
 
a7566b2
 
918d142
a7566b2
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.11-slim AS gradio
RUN useradd -m -u 1000 app
USER app
ENV HOME=/home/app \
  PATH=/home/app/.local/bin:$PATH
WORKDIR ${HOME}
COPY . .
# https://huggingface.co/docs/hub/spaces-sdks-docker#buildtime
RUN --mount=type=secret,id=EXTRA_INDEX_URL,mode=0444,required=true \
  pip install --no-cache-dir --extra-index-url=$(cat /run/secrets/EXTRA_INDEX_URL) cycloud-sdk-python-auth > /dev/null 2>&1
RUN pip install --no-cache-dir -r requirements.txt
RUN --mount=type=secret,id=LLM_CREDENTIALS,mode=0444,required=true \
  cat /run/secrets/LLM_CREDENTIALS > ${HOME}/credentials.json
EXPOSE 7860

ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"]