bloomz.cpp-converter / Dockerfile
testbot
add git lfs to docker image
97781b0
# See https://hub.docker.com/r/nikolaik/python-nodejs
# https://github.com/nikolaik/docker-python-nodejs
# Default user is 'pn' with uid 1000, gid 1000
FROM python:3.10
RUN apt-get update && apt-get install -y \
git \
git-lfs \
cmake \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# User
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /home/user/app
# Install Python deps
RUN pip install --no-cache-dir pip && \
pip install --no-cache-dir \
gradio \
torch \
numpy \
transformers \
accelerate
# Prepare bloomz.cpp
RUN git clone https://github.com/NouamaneTazi/bloomz.cpp
WORKDIR $HOME/app/bloomz.cpp
# just to ensure not being on main branch # TODO: might remove this in the future
RUN git checkout 4fc96cbf2e2c257eaca1cd7b7ed8e31741e672ee
RUN make
# Add files
COPY . $HOME/app
ENV PYTHONPATH=$HOME/app \
PYTHONUNBUFFERED=1 \
GRADIO_ALLOW_FLAGGING=never \
GRADIO_NUM_PORTS=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_THEME=huggingface \
SYSTEM=spaces
# Run script
WORKDIR $HOME/app
CMD ["python", "app.py"]