sudo -E add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
sudo -E add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
build rustformers dockerfile
step 1: git clone https://github.com/rustformers/llm.git && git submodule update --init
step 2: cd llm && mv utils/Dockerfile .
step 3: modify dockerfile as shown below
# Start with a rust alpine image
FROM rust:alpine3.19 as builder
# This is important, see https://github.com/rust-lang/docker-rust/issues/85
ENV RUSTFLAGS="-C target-feature=-crt-static"
# if needed, add additional dependencies here
RUN apk add --no-cache musl-dev pkgconfig openssl-dev
# set the workdir and copy the source into it
WORKDIR /app
COPY ./ /app
# do a release build
RUN cargo build --release --bin llm
RUN strip target/release/llm
step 4: docker build -t rustformers:v1 .