compile-on-startup (#21)
Browse files- Compile on startup (a53cd4cd0b071fff1011ba46920d3a04189dc28c)
- Dockerfile +2 -6
- 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 |
-
|
|
|
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
|