Nafiul Huda commited on
Update Dockerfile
Browse files- Dockerfile +15 -5
Dockerfile
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
#
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
-
espeak-ng \
|
| 6 |
-
libsndfile1 \
|
| 7 |
ffmpeg \
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -16,10 +14,22 @@ ENV HF_HOME="/home/user/.cache/huggingface"
|
|
| 16 |
|
| 17 |
WORKDIR /home/user/app
|
| 18 |
|
| 19 |
-
|
|
|
|
| 20 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 21 |
-
pip install --no-cache-dir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
|
|
|
| 23 |
COPY --chown=user:user . .
|
| 24 |
|
| 25 |
EXPOSE 7860
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Install light system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
|
|
| 5 |
ffmpeg \
|
| 6 |
git \
|
| 7 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 14 |
|
| 15 |
WORKDIR /home/user/app
|
| 16 |
|
| 17 |
+
# Install Python dependencies directly (replacing requirements.txt)
|
| 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 |
+
onnxruntime==1.21.0 \
|
| 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 \
|
| 30 |
+
"huggingface_hub>=0.27.0"
|
| 31 |
|
| 32 |
+
# Copy the rest of the application
|
| 33 |
COPY --chown=user:user . .
|
| 34 |
|
| 35 |
EXPOSE 7860
|