demo-docker-gradio / Dockerfile
Sébastien De Greef
Update .gitignore and add ollama install to Dockerfile
e7a2ae9
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN rm -f /etc/apt/sources.list.d/*.list && \
apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
sudo \
git \
git-lfs \
zip \
unzip \
htop \
bzip2 \
libx11-6 \
build-essential \
libsndfile-dev \
software-properties-common \
gcc \
wget \
lshw \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://ollama.com/install.sh | sh
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
ENV CONDA_AUTO_UPDATE_CONDA=true \
PATH=$HOME/miniconda/bin:$PATH
RUN curl -sLo ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py311_23.11.0-1-Linux-x86_64.sh \
&& chmod +x ~/miniconda.sh \
&& ~/miniconda.sh -b -p ~/miniconda \
&& rm ~/miniconda.sh \
&& conda clean -ya
# Set the working directory to the user's home directory
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
RUN chmod +x $HOME/app/start_server.sh
ENTRYPOINT ["/home/user/app/start_server.sh"]