Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -12
Dockerfile
CHANGED
|
@@ -1,31 +1,23 @@
|
|
| 1 |
FROM python:3.10-bookworm
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN apt-get update && apt-get install -y \
|
| 5 |
-
curl \
|
| 6 |
-
git \
|
| 7 |
-
procps \
|
| 8 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
# Standard Hugging Face user setup
|
| 11 |
RUN useradd -m -u 1000 user
|
| 12 |
ENV HOME=/home/user \
|
| 13 |
PATH=/home/user/.local/bin:$PATH
|
| 14 |
WORKDIR $HOME/app
|
| 15 |
|
| 16 |
-
# Pre-create and set permissions
|
| 17 |
RUN mkdir -p $HOME/app/model_cache && chown -R user:user $HOME/app
|
| 18 |
USER user
|
| 19 |
|
| 20 |
-
# Install the
|
| 21 |
RUN pip install --no-cache-dir \
|
| 22 |
https://github.com/mrzeeshanahmed/llama-cpp-python/releases/download/v0.3.17-manylinux-x86_64/llama_cpp_python-0.3.17-cp310-cp310-manylinux_2_17_x86_64.whl \
|
| 23 |
huggingface-hub \
|
| 24 |
hf-transfer \
|
| 25 |
-
|
| 26 |
|
| 27 |
-
# Copy files
|
| 28 |
COPY --chown=user . .
|
| 29 |
|
| 30 |
-
#
|
| 31 |
CMD ["python", "-u", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10-bookworm
|
| 2 |
|
| 3 |
+
RUN apt-get update && apt-get install -y curl git procps && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
|
|
|
| 5 |
RUN useradd -m -u 1000 user
|
| 6 |
ENV HOME=/home/user \
|
| 7 |
PATH=/home/user/.local/bin:$PATH
|
| 8 |
WORKDIR $HOME/app
|
| 9 |
|
|
|
|
| 10 |
RUN mkdir -p $HOME/app/model_cache && chown -R user:user $HOME/app
|
| 11 |
USER user
|
| 12 |
|
| 13 |
+
# Install the specific pre-built wheel for CPU
|
| 14 |
RUN pip install --no-cache-dir \
|
| 15 |
https://github.com/mrzeeshanahmed/llama-cpp-python/releases/download/v0.3.17-manylinux-x86_64/llama_cpp_python-0.3.17-cp310-cp310-manylinux_2_17_x86_64.whl \
|
| 16 |
huggingface-hub \
|
| 17 |
hf-transfer \
|
| 18 |
+
gradio
|
| 19 |
|
|
|
|
| 20 |
COPY --chown=user . .
|
| 21 |
|
| 22 |
+
# Run the app.py with unbuffered logs
|
| 23 |
CMD ["python", "-u", "app.py"]
|