pcuenq HF staff commited on
Commit
a53cd4c
1 Parent(s): 485b929

Compile on startup

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -6
  2. start.sh +4 -0
Dockerfile CHANGED
@@ -40,11 +40,7 @@ RUN pyenv install ${PYTHON_VERSION} && \
40
  pip install "huggingface-hub" "hf-transfer" "gradio"
41
 
42
  COPY --chown=1000 . ${HOME}/app
43
- RUN git clone https://github.com/ggerganov/llama.cpp && \
44
- cd llama.cpp && \
45
- make clean && \
46
- make
47
-
48
  RUN pip install -r llama.cpp/requirements.txt
49
 
50
  ENV PYTHONPATH=${HOME}/app \
@@ -58,4 +54,4 @@ ENV PYTHONPATH=${HOME}/app \
58
  TQDM_MININTERVAL=1 \
59
  SYSTEM=spaces
60
 
61
- CMD ["python", "app.py"]
 
40
  pip install "huggingface-hub" "hf-transfer" "gradio"
41
 
42
  COPY --chown=1000 . ${HOME}/app
43
+ RUN git clone https://github.com/ggerganov/llama.cpp
 
 
 
 
44
  RUN pip install -r llama.cpp/requirements.txt
45
 
46
  ENV PYTHONPATH=${HOME}/app \
 
54
  TQDM_MININTERVAL=1 \
55
  SYSTEM=spaces
56
 
57
+ ENTRYPOINT /bin/sh start.sh
start.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ cd llama.cpp
2
+ make quantize
3
+ cd ..
4
+ python app.py