Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
|
@@ -18,7 +18,7 @@ RUN mkdir -p /tmp/tts_models /tmp/huggingface /tmp/torch /tmp/voices /tmp/output
|
|
| 18 |
# Copy requirements first for better caching
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
-
# Install Python dependencies
|
| 22 |
RUN pip install --upgrade pip && \
|
| 23 |
pip install --no-cache-dir --upgrade setuptools wheel && \
|
| 24 |
pip install --no-cache-dir -r requirements.txt
|
|
@@ -33,5 +33,9 @@ USER user
|
|
| 33 |
# Expose port
|
| 34 |
EXPOSE 8000
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
# Start the application
|
| 37 |
CMD ["python", "app.py"]
|
|
|
|
| 18 |
# Copy requirements first for better caching
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
+
# Install Python dependencies
|
| 22 |
RUN pip install --upgrade pip && \
|
| 23 |
pip install --no-cache-dir --upgrade setuptools wheel && \
|
| 24 |
pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 33 |
# Expose port
|
| 34 |
EXPOSE 8000
|
| 35 |
|
| 36 |
+
# Health check (important for HuggingFace)
|
| 37 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
| 38 |
+
CMD curl -f http://localhost:8000/health || exit 1
|
| 39 |
+
|
| 40 |
# Start the application
|
| 41 |
CMD ["python", "app.py"]
|