Update Dockerfile
Browse files- Dockerfile +13 -11
Dockerfile
CHANGED
|
@@ -1,30 +1,32 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# Install minimal system tools
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
ffmpeg \
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
-
# Set up user
|
| 9 |
RUN useradd -m -u 1000 user
|
| 10 |
USER user
|
| 11 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
| 12 |
|
| 13 |
WORKDIR /home/user/app
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
#
|
|
|
|
| 17 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 18 |
pip install --no-cache-dir \
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
"huggingface_hub" \
|
| 23 |
"numpy<2.0" \
|
| 24 |
-
|
| 25 |
-
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 26 |
-
--only-binary :all:
|
| 27 |
|
|
|
|
| 28 |
COPY --chown=user:user . .
|
| 29 |
|
| 30 |
EXPOSE 7860
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Install minimal system tools needed for audio (ffmpeg)
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
ffmpeg \
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# Set up user for Hugging Face Spaces
|
| 9 |
RUN useradd -m -u 1000 user
|
| 10 |
USER user
|
| 11 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 12 |
+
ENV HF_HOME="/home/user/.cache/huggingface"
|
| 13 |
|
| 14 |
WORKDIR /home/user/app
|
| 15 |
|
| 16 |
+
# Install dependencies.
|
| 17 |
+
# We keep the extra-index-url so it downloads the fast CPU wheel,
|
| 18 |
+
# but removed --only-binary so it correctly detects our Debian (glibc) environment.
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 20 |
pip install --no-cache-dir \
|
| 21 |
+
flask==3.1.1 \
|
| 22 |
+
edge-tts \
|
| 23 |
+
num2words==0.5.14 \
|
| 24 |
+
"huggingface_hub>=0.27.0" \
|
| 25 |
"numpy<2.0" \
|
| 26 |
+
llama-cpp-python \
|
| 27 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
|
|
|
| 28 |
|
| 29 |
+
# Copy the rest of the application
|
| 30 |
COPY --chown=user:user . .
|
| 31 |
|
| 32 |
EXPOSE 7860
|