Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
|
@@ -8,19 +8,23 @@ RUN apt-get update && \
|
|
| 8 |
ffmpeg \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Copy requirements
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Application
|
| 16 |
COPY app.py audio_generator.py ./
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
CMD ["python", "app.py"]
|
|
|
|
| 8 |
ffmpeg \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Copy requirements
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Application files
|
| 16 |
COPY app.py audio_generator.py ./
|
| 17 |
|
| 18 |
+
# Create output directory
|
| 19 |
+
RUN mkdir -p /app/outputs && \
|
| 20 |
+
chmod 777 /app/outputs
|
| 21 |
|
| 22 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 23 |
+
PORT=7860
|
| 24 |
|
| 25 |
+
EXPOSE ${PORT}
|
| 26 |
+
|
| 27 |
+
HEALTHCHECK --interval=30s --timeout=10s \
|
| 28 |
+
CMD curl -f http://localhost:${PORT}/health || exit 1
|
| 29 |
|
| 30 |
CMD ["python", "app.py"]
|