Spaces:
Running
on
T4
Running
on
T4
FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
curl \ | |
build-essential \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
python3-pip \ | |
python3-dev \ | |
ninja-build \ | |
libmagic-dev \ | |
pandoc>=2.14.2 \ | |
libreoffice \ | |
tesseract-ocr \ | |
poppler-utils \ | |
git \ | |
&& apt-get clean && rm -rf /var/lib/apt/lists/* | |
WORKDIR /data | |
COPY ./requirements.txt /data/requirements.txt | |
RUN pip3 install --no-cache-dir --upgrade -r /data/requirements.txt | |
RUN CMAKE_ARGS="-DLLAMA_CUDA=on" pip3 install --no-cache-dir llama-cpp-python | |
RUN curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o /usr/local/bin/standalone_embed.sh \ | |
&& chmod +x /usr/local/bin/standalone_embed.sh | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH \ | |
PYTHONPATH=$HOME/app \ | |
PYTHONUNBUFFERED=1 \ | |
NVIDIA_VISIBLE_DEVICES=all \ | |
NVIDIA_DRIVER_CAPABILITIES=compute,utility \ | |
SYSTEM=spaces \ | |
HF_HOME=/data | |
WORKDIR $HOME/data | |
COPY --chown=user . $HOME/data | |
EXPOSE 8501 | |
CMD /usr/local/bin/standalone_embed.sh start && streamlit run app.py \ | |
--server.headless true \ | |
--server.enableCORS false \ | |
--server.enableXsrfProtection false \ | |
--server.fileWatcherType watchdog \ | |
--theme.backgroundColor "#EEE3D3" \ | |
--theme.secondaryBackgroundColor "#CCC8C2" \ | |
--theme.primaryColor "#EF792D" \ | |
--theme.textColor "#7D6654" |