Created
March 20, 2023 15:42
-
-
Save samclane/f6e0558cc03c5ec85eaaf0080eec1c0f to your computer and use it in GitHub Desktop.
Docker to run alpaca.cpp (hopefully)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Ubuntu as the base image | |
FROM ubuntu:20.04 | |
# Set environment variables | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Update and install dependencies | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
build-essential \ | |
cmake \ | |
git \ | |
curl \ | |
ca-certificates \ | |
&& \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# Clone the Alpaca.cpp repository | |
RUN git clone https://github.com/antimatter15/alpaca.cpp /alpaca | |
# Build the project | |
WORKDIR /alpaca | |
RUN cmake . && \ | |
cmake --build . --config Release | |
# Download the weights | |
RUN curl -o ggml-alpaca-7b-q4.bin -C - https://gateway.estuary.tech/gw/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC | |
# Expose a port to interact with the model | |
EXPOSE 8080 | |
# Run the chat executable | |
CMD ["./chat"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment