Skip to content

Commit c757f7c

Browse files
committed
Text gen inference
1 parent d67b073 commit c757f7c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
!src
33
!scripts
44
!transformers
5+
!text-generation-inference
56
!requirements.txt
67
!Makefile

Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ RUN useradd -m -u $USER -s /bin/bash $USERNAME \
1010
&& chown $USERNAME /app
1111

1212
# git-lfs is needed to interact with the huggingface hub
13+
# ssl and gcc are needed for text-gen-inference
1314
RUN apt-get update \
14-
&& apt-get install git-lfs \
15+
&& apt-get install git-lfs libssl-dev gcc \
1516
&& rm -rf /var/lib/apt/lists/* \
1617
&& git lfs install
1718

19+
20+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
21+
&& PROTOC_ZIP=protoc-21.12-linux-x86_64.zip \
22+
&& curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP \
23+
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
24+
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
25+
&& rm -f $PROTOC_ZIP \
26+
&& chmod 777 /root/ && chmod 777 /root/.cargo
27+
28+
ENV PATH="/root/.cargo/bin:$PATH"
29+
30+
COPY --chown=$USERNAME text-generation-inference/ ./text-generation-inference
31+
32+
RUN cd text-generation-inference && make install && make install-benchmark && cd ..
33+
1834
COPY --chown=$USERNAME ./requirements.txt ./
1935
COPY --chown=$USERNAME transformers/ ./transformers
2036

0 commit comments

Comments
 (0)