-
Notifications
You must be signed in to change notification settings - Fork 120
/
Dockerfile
26 lines (19 loc) · 909 Bytes
/
Dockerfile
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
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
From ubuntu:22.04
RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
chown -R user /home/user/
ARG DEBIAN_FRONTEND=noninteractive
ENV GLIBC_TUNABLES glibc.cpu.x86_shstk=permissive
RUN apt update && apt install -y python3 python3-pip
COPY comps /home/user/comps
RUN pip3 install torch==2.2.2 torchvision --index-url https://download.pytorch.org/whl/cpu
RUN pip3 install intel-extension-for-pytorch==2.2.0
RUN pip3 install transformers
RUN pip3 install llmspec mosec
RUN cd /home/user/ && export HF_ENDPOINT=https://hf-mirror.com && huggingface-cli download --resume-download BAAI/bge-large-zh-v1.5 --local-dir /home/user/bge-large-zh-v1.5
USER user
ENV MOSEC_EMBEDDING_MODEL="/home/user/bge-large-zh-v1.5/"
WORKDIR /home/user/comps/embeddings/mosec/langchain/dependency
CMD ["python3", "server-ipex.py"]