Spaces:
Running
Running
Update Dockerfile.min
Browse files- Dockerfile.min +12 -1
Dockerfile.min
CHANGED
|
@@ -12,9 +12,20 @@ RUN mkdir -p voices config
|
|
| 12 |
|
| 13 |
COPY requirements*.txt /app/
|
| 14 |
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements-min.txt
|
|
|
|
| 15 |
COPY *.py *.sh *.default.yaml README.md LICENSE /app/
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
ENV TTS_HOME=voices
|
| 18 |
ENV HF_HOME=voices
|
| 19 |
|
| 20 |
-
CMD bash startup.min.sh
|
|
|
|
| 12 |
|
| 13 |
COPY requirements*.txt /app/
|
| 14 |
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements-min.txt
|
| 15 |
+
|
| 16 |
COPY *.py *.sh *.default.yaml README.md LICENSE /app/
|
| 17 |
|
| 18 |
+
# Ensure scripts are executable
|
| 19 |
+
RUN chmod +x /app/*.sh
|
| 20 |
+
|
| 21 |
+
# Add a non-root user and change ownership
|
| 22 |
+
RUN useradd -ms /bin/bash appuser
|
| 23 |
+
RUN chown -R appuser:appuser /app
|
| 24 |
+
|
| 25 |
+
USER appuser
|
| 26 |
+
WORKDIR /app
|
| 27 |
+
|
| 28 |
ENV TTS_HOME=voices
|
| 29 |
ENV HF_HOME=voices
|
| 30 |
|
| 31 |
+
CMD bash startup.min.sh
|