Nafiul Huda commited on
Create Dockerfile
Browse files- Dockerfile +36 -0
Dockerfile
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a lightweight Python base
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install dependencies needed for compiling llama-cpp and running Piper
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
wget \
|
| 10 |
+
xz-utils \
|
| 11 |
+
build-essential \
|
| 12 |
+
cmake \
|
| 13 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
+
|
| 15 |
+
# Download Piper TTS Binary
|
| 16 |
+
RUN wget -qO- https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz | tar -xz
|
| 17 |
+
|
| 18 |
+
# Download a fast, low-quality English voice for maximum speed
|
| 19 |
+
RUN wget -O voice.onnx https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/low/en_US-lessac-low.onnx
|
| 20 |
+
RUN wget -O voice.onnx.json https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/low/en_US-lessac-low.onnx.json
|
| 21 |
+
|
| 22 |
+
# Download your specific Qwen model
|
| 23 |
+
# NOTE: Replace the link below with the actual direct download URL to your Q3 GGUF file.
|
| 24 |
+
RUN wget -O model.gguf "https://huggingface.co/path/to/your/Qwen3.5-0.8B-UD-Q3_K_XL.gguf"
|
| 25 |
+
|
| 26 |
+
# Install Python packages
|
| 27 |
+
RUN pip install --no-cache-dir gradio llama-cpp-python
|
| 28 |
+
|
| 29 |
+
# Copy the application code
|
| 30 |
+
COPY app.py .
|
| 31 |
+
|
| 32 |
+
# Expose port for Hugging Face Spaces
|
| 33 |
+
EXPOSE 7860
|
| 34 |
+
|
| 35 |
+
# Run the app
|
| 36 |
+
CMD ["python", "app.py"]
|