# Dockerfile for stemo:llm FROM debian:bookworm AS initial # install dependencies RUN apt-get update && apt-get upgrade -y RUN apt-get install -y wget python3 python3-pip python3-venv time git git-lfs # use root dir for our setup WORKDIR /root # prepare space for llm RUN mkdir /mnt/llama2 && touch /mnt/llama2/llama-2-7b.Q5_K_M.gguf && ln -s /mnt/llama2/llama-2-7b.Q5_K_M.gguf llama-2-7b.Q5_K_M.gguf #RUN git clone https://huggingface.co/openai-community/gpt2 # setup virtual env for python and make it easily available for later use ENV VIRTUAL_ENV=/root/venv RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" RUN pip install llama_cpp_python transformers RUN pip install torch --index-url https://download.pytorch.org/whl/cpu FROM scratch WORKDIR /root ENV VIRTUAL_ENV=/root/venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" COPY --from=initial / /