imseldrith commited on
Commit
ecff27e
1 Parent(s): c31a504

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -26,7 +26,12 @@ COPY requirements*.txt /home/appuser/app/
26
  RUN --mount=type=cache,target=/home/appuser/.cache/pip pip install -r requirements.txt
27
 
28
  COPY *.py *.sh *.default.yaml README.md LICENSE /home/appuser/app/
29
- RUN chmod +x *.sh # Ensure scripts are executable
 
 
 
 
 
30
 
31
  ARG PRELOAD_MODEL
32
  ENV PRELOAD_MODEL=${PRELOAD_MODEL}
@@ -34,4 +39,4 @@ ENV TTS_HOME=voices
34
  ENV HF_HOME=voices
35
  ENV COQUI_TOS_AGREED=1
36
 
37
- CMD bash startup.sh
 
26
  RUN --mount=type=cache,target=/home/appuser/.cache/pip pip install -r requirements.txt
27
 
28
  COPY *.py *.sh *.default.yaml README.md LICENSE /home/appuser/app/
29
+
30
+ # Switch to root to change script permissions
31
+ USER root
32
+ RUN chmod +x /home/appuser/app/*.sh
33
+ # Switch back to non-root user
34
+ USER appuser
35
 
36
  ARG PRELOAD_MODEL
37
  ENV PRELOAD_MODEL=${PRELOAD_MODEL}
 
39
  ENV HF_HOME=voices
40
  ENV COQUI_TOS_AGREED=1
41
 
42
+ CMD bash startup.sh