mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 11:24:35 +00:00
a0c0516416
By using `pip install torch --index-url https://download.pytorch.org/whl/cpu` instead of `pip install torch` we can specify we want to install a CPU-only version of PyTorch without any GPU dependencies. This reduces the size of the Docker image from 7.32 GB to 1.62 GB
19 lines
398 B
Docker
19 lines
398 B
Docker
ARG UBUNTU_VERSION=22.04
|
|
|
|
FROM ubuntu:$UBUNTU_VERSION as build
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y build-essential python3 python3-pip
|
|
|
|
RUN pip install --upgrade pip setuptools wheel \
|
|
&& pip install numpy requests sentencepiece tqdm \
|
|
&& pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN make
|
|
|
|
ENTRYPOINT ["/app/.devops/tools.sh"]
|