devve1's picture
Update Dockerfile
245b206 verified
raw
history blame
No virus
820 Bytes
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends -y \
curl \
build-essential \
python3.10 \
python3-pip \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
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 \
SYSTEM=spaces
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
EXPOSE 8501
CMD streamlit run app.py \
--server.headless true \
--server.enableCORS false \
--server.enableXsrfProtection false \
--server.fileWatcherType none