Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -34
Dockerfile
CHANGED
@@ -1,41 +1,8 @@
|
|
1 |
-
FROM
|
2 |
-
|
3 |
-
RUN apt update
|
4 |
-
RUN apt install git
|
5 |
-
RUN git clone https://github.com/xorbitsai/inference.git
|
6 |
-
RUN cd inference
|
7 |
-
WORKDIR inference
|
8 |
-
|
9 |
-
ENV NVM_DIR /usr/local/nvm
|
10 |
-
ENV NODE_VERSION 14.21.1
|
11 |
-
|
12 |
-
RUN apt-get -y update \
|
13 |
-
&& apt install -y build-essential curl procps git libgl1 \
|
14 |
-
&& mkdir -p $NVM_DIR \
|
15 |
-
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
|
16 |
-
&& . $NVM_DIR/nvm.sh \
|
17 |
-
&& nvm install $NODE_VERSION \
|
18 |
-
&& nvm alias default $NODE_VERSION \
|
19 |
-
&& nvm use default \
|
20 |
-
&& apt-get -yq clean
|
21 |
-
|
22 |
-
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
23 |
|
24 |
# Copy the entry point script
|
25 |
COPY ./entrypoint.sh inference/entrypoint.sh
|
26 |
|
27 |
-
ARG PIP_INDEX=https://pypi.org/simple
|
28 |
-
RUN python -m pip install --upgrade -i "$PIP_INDEX" pip && \
|
29 |
-
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
|
30 |
-
pip install -i "$PIP_INDEX" --upgrade-strategy only-if-needed -r /inference/xinference/deploy/docker/requirements_cpu.txt && \
|
31 |
-
pip install "llama-cpp-python==0.2.77" --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu && \
|
32 |
-
cd /inference && \
|
33 |
-
python setup.py build_web && \
|
34 |
-
git restore . && \
|
35 |
-
pip install -i "$PIP_INDEX" --no-deps "." && \
|
36 |
-
# clean packages
|
37 |
-
pip cache purge
|
38 |
-
|
39 |
RUN useradd -m -u 1000 user
|
40 |
USER user
|
41 |
ENV HOME=/home/user \
|
|
|
1 |
+
FROM xprobe/xinference:nightly-main-cpu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# Copy the entry point script
|
4 |
COPY ./entrypoint.sh inference/entrypoint.sh
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
RUN useradd -m -u 1000 user
|
7 |
USER user
|
8 |
ENV HOME=/home/user \
|