-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (63 loc) · 1.72 KB
/
Dockerfile
File metadata and controls
75 lines (63 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 AS cuda_build_stage_1
# FROM debian:stable-slim
WORKDIR /curator
RUN set -x && \
apt-get update \
&& apt-get install -y git \
wget \
zip \
unzip \
libbz2-dev \
libncurses-dev \
libssl-dev \
libffi-dev \
libreadline6-dev \
libsqlite3-dev \
liblzma-dev \
libxml2-dev \
xz-utils \
libxmlsec1-dev \
python3-venv \
python3-pip
RUN git clone https://github.com/abetlen/llama-cpp-python.git --branch v0.3.2 . \
&& git submodule update --init --recursive
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv
ENV PYENV_ROOT="/curator/.pyenv"
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
RUN pyenv install 3.11
RUN pyenv global 3.11
FROM cuda_build_stage_1 AS cuda_build
ARG CMAKE_ARGS="-DGGML_CUDA=on"
# -DCMAKE_CUDA_ARCHITECTURES=all -DGGML_CUDA_FORCE_MMQ=on"
RUN pip install build wheel
RUN python -m build --wheel .
FROM debian:stable-slim AS final
WORKDIR /curator
COPY --from=cuda_build /curator/dist/llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl .
RUN set -x && \
apt-get update \
&& apt-get install -y git \
wget \
zip \
unzip \
libbz2-dev \
libncurses-dev \
libssl-dev \
libffi-dev \
libreadline6-dev \
libsqlite3-dev \
liblzma-dev \
libxml2-dev \
xz-utils \
libxmlsec1-dev \
python3-venv \
python3-pip
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv
ENV PYENV_ROOT="/curator/.pyenv"
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
RUN pyenv install 3.11
RUN pyenv global 3.11
RUN pip install llama_cpp_python-0.3.2-cp311-cp311-linux_x86_64.whl
COPY pyproject.toml .
COPY src /curator/src/
RUN pip install .