Spaces:
Sleeping
Sleeping
Commit ·
0c45022
1
Parent(s): 5dbacc6
ok
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
|
@@ -46,8 +46,14 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
| 46 |
|
| 47 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 48 |
libgomp1 \
|
|
|
|
|
|
|
| 49 |
&& rm -rf /var/lib/apt/lists/*
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
RUN useradd -m -u 1000 user
|
| 52 |
|
| 53 |
WORKDIR /app
|
|
@@ -58,6 +64,8 @@ COPY --from=builder /build/build/3rdparty/llama.cpp/ggml/src/libggml.so ./build/
|
|
| 58 |
|
| 59 |
ENV LD_LIBRARY_PATH=/app/build/lib
|
| 60 |
|
|
|
|
|
|
|
| 61 |
USER user
|
| 62 |
|
| 63 |
EXPOSE 7860
|
|
|
|
| 46 |
|
| 47 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 48 |
libgomp1 \
|
| 49 |
+
python3 \
|
| 50 |
+
python3-pip \
|
| 51 |
&& rm -rf /var/lib/apt/lists/*
|
| 52 |
|
| 53 |
+
RUN mkdir -p /models && \
|
| 54 |
+
pip3 install --no-cache-dir huggingface-hub && \
|
| 55 |
+
python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='microsoft/BitNet-b1.58-2B-4T-gguf', filename='ggml-model-i2_s.gguf', local_dir='/models')"
|
| 56 |
+
|
| 57 |
RUN useradd -m -u 1000 user
|
| 58 |
|
| 59 |
WORKDIR /app
|
|
|
|
| 64 |
|
| 65 |
ENV LD_LIBRARY_PATH=/app/build/lib
|
| 66 |
|
| 67 |
+
RUN chown -R user:user /app /models
|
| 68 |
+
|
| 69 |
USER user
|
| 70 |
|
| 71 |
EXPOSE 7860
|