pcuenq HF staff commited on
Commit
f259093
1 Parent(s): 1d54d3f

Compile on startup

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -7
  2. start.sh +4 -0
Dockerfile CHANGED
@@ -20,15 +20,9 @@ WORKDIR $HOME
20
  RUN mkdir app
21
  WORKDIR $HOME/app
22
 
23
- # Build llama.cpp (CPU, only `quantize`)
24
- # Should we pin a known commit?
25
  RUN git clone https://github.com/ggerganov/llama.cpp.git
26
- WORKDIR $HOME/app/llama.cpp
27
- RUN make quantize
28
- WORKDIR $HOME/app
29
 
30
  # App and Python reqs
31
- # Should we pin versions here?
32
  COPY --chown=user ./ $HOME/app
33
  RUN pip install --no-cache-dir -r requirements.txt
34
  RUN pip install --no-cache-dir -r llama.cpp/requirements.txt
@@ -42,4 +36,4 @@ ENV GRADIO_THEME huggingface
42
  ENV SYSTEM spaces
43
  ENV HF_HUB_ENABLE_HF_TRANSFER 1
44
 
45
- #CMD ["python", "app.py"]
 
20
  RUN mkdir app
21
  WORKDIR $HOME/app
22
 
 
 
23
  RUN git clone https://github.com/ggerganov/llama.cpp.git
 
 
 
24
 
25
  # App and Python reqs
 
26
  COPY --chown=user ./ $HOME/app
27
  RUN pip install --no-cache-dir -r requirements.txt
28
  RUN pip install --no-cache-dir -r llama.cpp/requirements.txt
 
36
  ENV SYSTEM spaces
37
  ENV HF_HUB_ENABLE_HF_TRANSFER 1
38
 
39
+ 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