Update Dockerfile
Browse files- Dockerfile +8 -9
Dockerfile
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# Install
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
ffmpeg \
|
| 6 |
git \
|
|
|
|
|
|
|
|
|
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
# HF Spaces requires uid 1000
|
|
@@ -14,16 +18,11 @@ ENV HF_HOME="/home/user/.cache/huggingface"
|
|
| 14 |
|
| 15 |
WORKDIR /home/user/app
|
| 16 |
|
| 17 |
-
# Install Python dependencies
|
| 18 |
-
# Note: Quotes are used around version constraints like >= and < to prevent shell redirection issues
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 20 |
pip install --no-cache-dir \
|
| 21 |
-
|
| 22 |
edge-tts \
|
| 23 |
-
torch==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu \
|
| 24 |
-
"transformers>=4.49.0" \
|
| 25 |
-
"accelerate>=1.3.0" \
|
| 26 |
-
"gguf>=0.10.0" \
|
| 27 |
flask==3.1.1 \
|
| 28 |
"numpy<2.0" \
|
| 29 |
num2words==0.5.14 \
|
|
@@ -34,4 +33,4 @@ COPY --chown=user:user . .
|
|
| 34 |
|
| 35 |
EXPOSE 7860
|
| 36 |
|
| 37 |
-
CMD
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
# Added build-essential and cmake which are required for llama-cpp-python
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
ffmpeg \
|
| 7 |
git \
|
| 8 |
+
build-essential \
|
| 9 |
+
cmake \
|
| 10 |
+
python3-dev \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# HF Spaces requires uid 1000
|
|
|
|
| 18 |
|
| 19 |
WORKDIR /home/user/app
|
| 20 |
|
| 21 |
+
# Install Python dependencies (Removed heavy torch/transformers!)
|
|
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 23 |
pip install --no-cache-dir \
|
| 24 |
+
llama-cpp-python \
|
| 25 |
edge-tts \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
flask==3.1.1 \
|
| 27 |
"numpy<2.0" \
|
| 28 |
num2words==0.5.14 \
|
|
|
|
| 33 |
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
+
CMD["python", "app.py"]
|