Update Dockerfile
Browse files- Dockerfile +16 -13
Dockerfile
CHANGED
|
@@ -1,22 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
FROM python:3.8-slim
|
| 3 |
|
| 4 |
-
# Install system
|
| 5 |
-
RUN apt-get update && \
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
# Set
|
|
|
|
|
|
|
| 10 |
WORKDIR /app
|
|
|
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
COPY . .
|
| 14 |
-
|
| 15 |
-
# Install Python dependencies
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
#
|
|
|
|
|
|
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
#
|
| 22 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
|
|
|
| 2 |
|
| 3 |
+
# Install system dependencies (espeak is required by Yakhyo's model logic)
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
espeak \
|
| 6 |
+
ffmpeg \
|
| 7 |
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# Set up non-root user
|
| 10 |
+
RUN useradd -m -u 1000 user
|
| 11 |
+
USER user
|
| 12 |
WORKDIR /app
|
| 13 |
+
ENV PATH="/home/user/.local/bin:${PATH}"
|
| 14 |
|
| 15 |
+
# Install Python requirements
|
| 16 |
+
COPY --chown=user requirements.txt .
|
|
|
|
|
|
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# Copy all repository folders (models, weights, voices)
|
| 20 |
+
COPY --chown=user . .
|
| 21 |
+
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Launch with uvicorn to support the FastAPI automation endpoint
|
| 25 |
CMD ["python", "app.py"]
|