Spaces:
Runtime error
Runtime error
Deploy v1.3.0: Dockerfile - Official Moshi PyTorch STT implementation
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -2,13 +2,16 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
curl \
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Copy requirements and install Python dependencies
|
| 11 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
# Copy application
|
|
@@ -17,9 +20,9 @@ COPY app.py .
|
|
| 17 |
# Expose port
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
HEALTHCHECK --interval=30s --timeout=30s --start-period=
|
| 22 |
CMD curl -f http://localhost:7860/health || exit 1
|
| 23 |
|
| 24 |
# Run application
|
| 25 |
-
CMD ["python", "app.py"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies needed for Moshi
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
curl \
|
| 8 |
+
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Copy requirements and install Python dependencies
|
| 12 |
COPY requirements.txt .
|
| 13 |
+
|
| 14 |
+
# Install Moshi and dependencies
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
# Copy application
|
|
|
|
| 20 |
# Expose port
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
+
# Health check
|
| 24 |
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=180s --retries=3 \
|
| 25 |
CMD curl -f http://localhost:7860/health || exit 1
|
| 26 |
|
| 27 |
# Run application
|
| 28 |
+
CMD ["python", "app.py"]
|