zhengr commited on
Commit
455b302
·
verified ·
1 Parent(s): 59f3419

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -19,15 +19,16 @@ RUN apt-get -y update \
19
 
20
  ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
21
 
 
 
22
  # Copy the entry point script
23
- COPY entrypoint.sh /entrypoint.sh
24
- COPY requirements.txt /requirements.txt
25
- RUN chmod +x /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 /requirements.txt && \
31
  pip install "llama-cpp-python==0.2.77" --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu && \
32
  cd /opt/inference && \
33
  python setup.py build_web && \
@@ -37,4 +38,4 @@ RUN python -m pip install --upgrade -i "$PIP_INDEX" pip && \
37
  pip cache purge
38
 
39
  # 设置ENTRYPOINT
40
- ENTRYPOINT ["/entrypoint.sh"]
 
19
 
20
  ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
21
 
22
+ WORKDIR opt/inference
23
+
24
  # Copy the entry point script
25
+ COPY entrypoint.sh /opt/inference/entrypoint.sh
26
+ RUN chmod +x /opt/inference/entrypoint.sh
 
27
 
28
  ARG PIP_INDEX=https://pypi.org/simple
29
  RUN python -m pip install --upgrade -i "$PIP_INDEX" pip && \
30
  pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
31
+ pip install -i "$PIP_INDEX" --upgrade-strategy only-if-needed -r /opt/inference/xinference/deploy/docker/requirements_cpu.txt && \
32
  pip install "llama-cpp-python==0.2.77" --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu && \
33
  cd /opt/inference && \
34
  python setup.py build_web && \
 
38
  pip cache purge
39
 
40
  # 设置ENTRYPOINT
41
+ ENTRYPOINT ["/opt/inference/entrypoint.sh"]